1 2018-06-28 Tom Tromey <tom@tromey.com>
3 * NEWS: Mention --enable-codesign.
4 * silent-rules.mk (ECHO_SIGN): New variable.
5 * configure.ac: Add --enable-codesign.
7 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
8 (gdb$(EXEEXT)): Optionally invoke codesign.
10 2018-06-28 Pedro Alves <palves@redhat.com>
12 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
14 (switch_to_thread_no_regs): Adjust comment.
15 * infcmd.c (stop_pc): Delete.
16 (post_create_inferior, info_program_command): Replace references
17 to stop_pc with references to thread_info->suspend.stop_pc.
18 * inferior.h (stop_pc): Delete declaration.
19 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
20 (handle_inferior_event_1, handle_signal_stop)
21 (process_event_stop_test, keep_going_stepped_thread)
22 (handle_step_into_function, handle_step_into_function_backward)
23 (print_stop_location): Replace references to stop_pc with
24 references to thread_info->suspend.stop_pc.
25 (struct infcall_suspend_state) <stop_pc>: Delete field.
26 (save_infcall_suspend_state, restore_infcall_suspend_state):
27 Remove references to inf_stat->stop_pc.
28 * linux-fork.c (fork_load_infrun_state): Likewise.
29 * record-btrace.c (record_btrace_set_replay): Likewise.
30 * record-full.c (record_full_goto_entry): Likewise.
31 * remote.c (print_one_stopped_thread): Likewise.
32 * target.c (target_resume): Extend comment.
33 * thread.c (set_executing_thread): New.
34 (set_executing): Use it.
35 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
36 Remove references to stop_pc.
38 2018-06-28 Pedro Alves <palves@redhat.com>
40 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
41 Moving fetching stop_pc until after ecs->event_thread is refreshed.
43 2018-06-28 Tom Tromey <tom@tromey.com>
45 * coffread.c (coff_symfile_finish): Update.
46 * xcoffread.c (xcoff_symfile_finish): Update.
47 * elfread.c (elf_symfile_finish): Update.
48 * symfile.h (dwarf2_free_objfile): Don't declare.
49 * dwarf2read.c (_initialize_dwarf2_read): Use
50 register_objfile_data_with_cleanup.
51 (dwarf2_free_objfile): Now static. Change signature.
53 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
55 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
56 option "-o" to add-symbol-file-load to add an offset to each
57 section's load address.
58 * symfile.c (set_objfile_default_section_offset): New function.
60 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
62 * symfile.c (add_symbol_file_command): Make sure that sections
63 with the same name are sorted in the same order.
65 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
67 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
68 require the second argument. If omitted, load sections at the
69 addresses specified in the file.
71 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
73 * symfile.c (symbol_file_command, symbol_file_add_main_1)
74 (_initialize_symfile): Add option "-o" to symbol-file to add an
75 offset to each section of the symbol file.
77 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
79 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
81 2018-06-27 Tom Tromey <tom@tromey.com>
83 * stack.c (_initialize_stack): Update "func" help text.
85 2018-06-27 Tom Tromey <tom@tromey.com>
87 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
89 (unwind_infopy_str, pyuw_create_unwind_info)
90 (unwind_infopy_add_saved_register, pyuw_sniffer)
91 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
93 (struct saved_reg): Add constructor.
94 <value>: Now a gdbpy_ref<>.
96 2018-06-27 Tom Tromey <tom@tromey.com>
98 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
100 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
102 * gdb-gdb.py.in: Format using autopep8.
104 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
106 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
107 (type_lookup_function): Recognize CORE_ADDR values.
109 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
111 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
114 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
116 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
119 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
121 * gdb-gdb.py: Move to...
122 * gdb-gdb.py.in: ... here.
123 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
124 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
126 (distclean): Remove gdb-gdb.py when cleaning.
127 (gdb-gdb.py, gdb-gdb.gdb): New rules.
128 * configure: Re-generate.
130 2018-06-27 Pedro Alves <palves@redhat.com>
132 * proc-service.c (get_ps_regcache): New.
133 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
134 (ps_lsetfpregs): Use it.
136 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
139 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
140 (dwarf_decode_lines_1): Adjust.
142 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
144 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
146 <info_proc>: Likewise.
148 2018-06-26 Joel Brobecker <brobecker@adacore.com>
150 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
151 to windows_fetch_one_register, and only handle the case of
152 fetching one register. Move the code that reloads the context
153 and iterates over all registers if R is negative to...
154 (windows_nat_target::fetch_registers): ... here.
155 (do_windows_store_inferior_registers): Rename to
156 windows_store_one_register, and only handle the case of storing
157 one register. Move the code that handles the case where r is
159 (windows_nat_target::store_registers) ... here.
161 2018-06-26 Tom Tromey <tom@tromey.com>
164 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
165 * rust-lang.c (rust_print_struct_def): Add podata parameter.
167 (rust_internal_print_type): Add podata parameter.
168 (rust_print_type): Update.
170 2018-06-26 Tom Tromey <tom@tromey.com>
172 * typeprint.h (struct print_offset_data) <update, finish,
173 maybe_print_hole>: New methods.
174 <indentation>: New constant.
175 * typeprint.c (print_offset_data::indentation): Define.
176 (print_offset_data::maybe_print_hole, print_offset_data::update)
177 (print_offset_data::finish): Move from c-typeprint.c and rename.
178 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
179 (print_spaces_filtered_with_print_options): Update.
180 (c_print_type_union_field_offset, maybe_print_hole)
181 (c_print_type_struct_field_offset): Move to typeprint.c and
183 (c_type_print_base_struct_union): Update.
185 2018-06-25 Pedro Alves <palves@redhat.com>
187 * gdbthread.h (thread_info_ref, delete_thread)
188 (delete_thread_silent, first_thread_of_inferior)
189 (any_thread_of_inferior, switch_to_thread)
190 (enable_thread_stack_temporaries)
191 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
192 (get_last_thread_stack_temporary)
193 (value_in_thread_stack_temporaries, can_access_registers_thread):
194 Spell out "struct thread_info" instead of just "thread_info".
195 * inferior.h (notice_new_inferior): Likewise.
197 2018-06-25 Pedro Alves <palves@redhat.com>
199 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
200 pass thread_info pointer to delete_thread.
201 (windows_nat_target::detach): Pass inferior pointer to
203 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
205 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
206 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
207 and pass a thread_info pointer to delete_thread.
208 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
209 pass thread_info pointer to delete_thread.
210 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
211 delete_thread_silent call.
212 * procfs.c (procfs_target::detach): Pass inferior pointer to
214 (procfs_target::wait): Pass thread_info pointer to delete_thread.
215 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
216 delete_thread_silent call.
217 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
218 pass thread_info pointer to delete_thread.
219 (windows_nat_target::detach): Pass inferior pointer to
222 2018-06-22 Alan Hayward <alan.hayward@arm.com>
224 * regcache.c (readable_regcache::read_part): Fix asserts.
225 (reg_buffer::raw_collect_part): New function.
226 (regcache::write_part): Fix asserts.
227 (reg_buffer::raw_supply_part): New function.
228 (regcache::transfer_regset_register): New helper function.
229 (regcache::transfer_regset): Call new functions.
230 (regcache_supply_regset): Use gdb_byte*.
231 (regcache::supply_regset): Likewise.
232 (regcache_collect_regset): Likewise.
233 (regcache::collect_regset): Likewise.
234 * regcache.h (reg_buffer::raw_collect_part): New declaration.
235 (reg_buffer::raw_supply_part): Likewise.
236 (regcache::transfer_regset_register): Likewise.
237 (regcache::transfer_regset): Use gdb_byte*.
239 2018-06-22 Alan Hayward <alan.hayward@arm.com>
241 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
243 2018-06-21 Pedro Alves <palves@redhat.com>
245 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
246 instead of a ptid_t. All callers adjusted.
247 * ada-tasks.c (ada_get_task_number): Likewise. All callers
249 (print_ada_task_info, display_current_task_id, task_command_1):
251 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
253 (breakpoint_kind): Adjust.
254 (remove_breakpoints_pid): Rename to ...
255 (remove_breakpoints_inf): ... this. Adjust to take an inferior
256 pointer. All callers adjusted.
257 (bpstat_clear_actions): Use inferior_thread.
258 (get_bpstat_thread): New.
259 (bpstat_do_actions): Use it.
260 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
261 to take a thread_info pointer. All callers adjusted.
262 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
263 (breakpoint_re_set_thread): Use inferior_thread.
264 * breakpoint.h (struct inferior): Forward declare.
265 (bpstat_stop_status): Update.
266 (remove_breakpoints_pid): Delete.
267 (remove_breakpoints_inf): New.
268 * bsd-uthread.c (bsd_uthread_target::wait)
269 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
270 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
271 (maint_btrace_packet_history_cmd)
272 (maint_btrace_clear_packet_history_cmd): Adjust.
273 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
275 * cli/cli-interp.c: Include "inferior.h".
276 * common/refcounted-object.h (struct
277 refcounted_object_ref_policy): New.
278 * compile/compile-object-load.c: Include gdbthread.h.
279 (store_regs): Use inferior_thread.
280 * corelow.c (core_target::close): Use current_inferior.
281 (core_target_open): Adjust to use first_thread_of_inferior and use
282 the current inferior.
283 * ctf.c (ctf_target::close): Adjust to use current_inferior.
284 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
285 <thread>: ... this new field. All references adjusted.
286 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
287 Take a thread_info pointer instead of a ptid_t.
288 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
289 (dummy_frame_discard, register_dummy_frame_dtor): Take a
290 thread_info pointer instead of a ptid_t.
291 * elfread.c: Include "inferior.h".
292 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
294 * eval.c (evaluate_subexp): Likewise.
295 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
297 * gdb_proc_service.h (struct thread_info): Forward declare.
298 (struct ps_prochandle) <ptid>: Delete, replaced by ...
299 <thread>: ... this new field. All references adjusted.
300 * gdbarch.h, gdbarch.c: Regenerate.
301 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
302 'thread' parameter. All implementations and callers adjusted.
303 * gdbthread.h (thread_info) <set_running>: New method.
304 (delete_thread, delete_thread_silent): Take a thread_info pointer
306 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
307 (first_thread_of_process): Delete, replaced by ...
308 (first_thread_of_inferior): ... this new function. All callers
310 (any_live_thread_of_process): Delete, replaced by ...
311 (any_live_thread_of_inferior): ... this new function. All callers
313 (switch_to_thread, switch_to_no_thread): Declare.
314 (is_executing): Delete.
315 (enable_thread_stack_temporaries): Update comment.
316 <enable_thread_stack_temporaries>: Take a thread_info pointer
317 instead of a ptid_t. Incref the thread.
318 <~enable_thread_stack_temporaries>: Decref the thread.
321 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
322 (get_last_thread_stack_temporary)
323 (value_in_thread_stack_temporaries, can_access_registers_thread):
324 Take a thread_info pointer instead of a ptid_t. All callers
326 * infcall.c (get_call_return_value): Use inferior_thread.
327 (run_inferior_call): Work with thread pointers instead of ptid_t.
328 (call_function_by_hand_dummy): Work with thread pointers instead
329 of ptid_t. Use thread_info_ref.
330 * infcmd.c (proceed_thread_callback): Access thread's state
332 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
333 access thread's state directly.
334 (continue_command): Use inferior_thread.
335 (info_program_command): Use find_thread_ptid and access thread
337 (proceed_after_attach_callback): Use thread state directly.
338 (notice_new_inferior): Take a thread_info pointer instead of a
339 ptid_t. All callers adjusted.
340 (exit_inferior): Take an inferior pointer instead of a pid. All
342 (exit_inferior_silent): New.
343 (detach_inferior): Delete.
344 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
345 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
346 (detach_inferior_command, kill_inferior_command): Use
347 find_inferior_id instead of valid_gdb_inferior_id and
348 gdb_inferior_id_to_pid.
349 (inferior_command): Use inferior and thread pointers.
350 * inferior.h (struct thread_info): Forward declare.
351 (notice_new_inferior): Take a thread_info pointer instead of a
352 ptid_t. All callers adjusted.
353 (detach_inferior): Delete declaration.
354 (exit_inferior, exit_inferior_silent): Take an inferior pointer
355 instead of a pid. All callers adjusted.
356 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
357 (valid_gdb_inferior_id): Delete.
358 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
359 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
360 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
362 <inf>: ... this new field.
363 <step_ptid>: Delete, replaced by ...
364 <step_thread>: ... this new field.
365 (get_displaced_stepping_state): Take an inferior pointer instead
366 of a pid. All callers adjusted.
367 (displaced_step_in_progress_any_inferior): Adjust.
368 (displaced_step_in_progress_thread): Take a thread pointer instead
369 of a ptid_t. All callers adjusted.
370 (displaced_step_in_progress, add_displaced_stepping_state): Take
371 an inferior pointer instead of a pid. All callers adjusted.
372 (get_displaced_step_closure_by_addr): Adjust.
373 (remove_displaced_stepping_state): Take an inferior pointer
374 instead of a pid. All callers adjusted.
375 (displaced_step_prepare_throw, displaced_step_prepare)
376 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
377 All callers adjusted.
378 (start_step_over): Adjust.
379 (infrun_thread_ptid_changed): Remove bit updating ptids in the
380 displaced step queue.
381 (do_target_resume): Adjust.
382 (fetch_inferior_event): Use inferior_thread.
383 (context_switch, get_inferior_stop_soon): Take an
384 execution_control_state pointer instead of a ptid_t. All callers
386 (switch_to_thread_cleanup): Delete.
387 (stop_all_threads): Use scoped_restore_current_thread.
388 * inline-frame.c: Include "gdbthread.h".
389 (inline_state) <inline_state>: Take a thread pointer instead of a
390 ptid_t. All callers adjusted.
391 <ptid>: Delete, replaced by ...
392 <thread>: ... this new field.
393 (find_inline_frame_state): Take a thread pointer instead of a
394 ptid_t. All callers adjusted.
395 (skip_inline_frames, step_into_inline_frame)
396 (inline_skipped_frames, inline_skipped_symbol): Take a thread
397 pointer instead of a ptid_t. All callers adjusted.
398 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
399 (inline_skipped_frames, inline_skipped_symbol): Likewise.
400 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
402 * linux-nat.c (get_detach_signal): Likewise.
403 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
404 (thread_db_notice_clone): Adjust.
405 (thread_db_find_new_threads_silently)
406 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
407 a thread pointer instead of a ptid_t. All callers adjusted.
408 * mi/mi-cmd-var.c: Include "inferior.h".
409 (mi_cmd_var_update_iter): Update to use thread pointers.
410 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
412 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
414 (mi_output_running): ... this new function.
415 (mi_on_resume_1): Adjust to use it.
416 (mi_user_selected_context_changed): Adjust to use inferior_thread.
417 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
419 (interrupt_thread_callback): : Adjust to use thread and inferior
421 * proc-service.c: Include "gdbthread.h".
422 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
423 * progspace-and-thread.c: Include "inferior.h".
424 * progspace.c: Include "inferior.h".
425 * python/py-exitedevent.c (create_exited_event_object): Adjust to
426 hold a reference to an inferior_object.
427 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
429 * python/py-inferior.c (struct inferior_object): Give the type a
430 tag name instead of a typedef.
431 (python_on_normal_stop): No need to check if the current thread is
433 (inferior_to_inferior_object): Change return type to
434 inferior_object. All callers adjusted.
435 (find_thread_object): Delete, bits factored out to ...
436 (thread_to_thread_object): ... this new function.
437 * python/py-infthread.c (create_thread_object): Use
438 inferior_to_inferior_object.
439 (thpy_is_stopped): Use thread pointer directly.
440 (gdbpy_selected_thread): Use inferior_thread.
441 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
442 field, replaced with ...
443 <thread>: ... this new field. All users adjusted.
444 (btpy_insn_or_gap_new): Drop const.
445 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
447 * python/py-record.c: Include "gdbthread.h".
448 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
449 a ptid_t. All callers adjusted.
450 (gdbpy_current_recording): Use inferior_thread.
451 * python/py-record.h (recpy_record_object) <ptid>: Delete
452 field, replaced with ...
453 <thread>: ... this new field. All users adjusted.
454 (recpy_element_object) <ptid>: Delete
455 field, replaced with ...
456 <thread>: ... this new field. All users adjusted.
457 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
458 a ptid_t. All callers adjusted.
459 * python/py-threadevent.c: Include "gdbthread.h".
460 (get_event_thread): Use thread_to_thread_object.
461 * python/python-internal.h (struct inferior_object): Forward
463 (find_thread_object, find_inferior_object): Delete declarations.
464 (thread_to_thread_object, inferior_to_inferior_object): New
466 * record-btrace.c: Include "inferior.h".
467 (require_btrace_thread): Use inferior_thread.
468 (record_btrace_frame_sniffer)
469 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
470 (get_thread_current_frame): Use scoped_restore_current_thread and
472 (get_thread_current_frame): Use thread pointer directly.
473 (record_btrace_replay_at_breakpoint): Use thread's inferior
475 * record-full.c: Include "inferior.h".
476 * regcache.c: Include "gdbthread.h".
477 (get_thread_arch_regcache): Use the inferior's address space
479 (get_thread_regcache, registers_changed_thread): New.
480 * regcache.h (get_thread_regcache(thread_info *thread)): New
482 (registers_changed_thread): New.
483 (remote_target) <remote_detach_1>: Swap order of parameters.
484 (remote_add_thread): <remote_add_thread>: Return the new thread.
485 (get_remote_thread_info(ptid_t)): New overload.
486 (remote_target::remote_notice_new_inferior): Use thread pointers
488 (remote_target::process_initial_stop_replies): Use
489 thread_info::set_running.
490 (remote_target::remote_detach_1, remote_target::detach)
491 (extended_remote_target::detach): Adjust.
492 * stack.c (frame_show_address): Use inferior_thread.
493 * target-debug.h (target_debug_print_thread_info_pp): New.
494 * target-delegates.c: Regenerate.
495 * target.c (default_thread_address_space): Delete.
496 (memory_xfer_partial_1): Use current_inferior.
497 (target_detach): Use current_inferior.
498 (target_thread_address_space): Delete.
499 (generic_mourn_inferior): Use current_inferior.
500 * target.h (struct target_ops) <thread_address_space>: Delete.
501 (target_thread_address_space): Delete.
502 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
504 (delete_thread_1, delete_thread, delete_thread_silent): Take a
505 thread pointer instead of a ptid_t. Adjust all callers.
506 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
507 (first_thread_of_process): Delete, replaced by ...
508 (first_thread_of_inferior): ... this new function. All callers
510 (any_thread_of_process): Rename to ...
511 (any_thread_of_inferior): ... this, and take an inferior pointer.
512 (any_live_thread_of_process): Rename to ...
513 (any_live_thread_of_inferior): ... this, and take an inferior
515 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
516 (value_in_thread_stack_temporaries)
517 (get_last_thread_stack_temporary): Take a thread pointer instead
518 of a ptid_t. Adjust all callers.
519 (thread_info::set_running): New.
520 (validate_registers_access): Use inferior_thread.
521 (can_access_registers_ptid): Rename to ...
522 (can_access_registers_thread): ... this, and take a thread
524 (print_thread_info_1): Adjust to compare thread pointers instead
526 (switch_to_no_thread, switch_to_thread): Make extern.
527 (scoped_restore_current_thread::~scoped_restore_current_thread):
528 Use m_thread pointer directly.
529 (scoped_restore_current_thread::scoped_restore_current_thread):
531 (thread_command): Use thread pointer directly.
532 (thread_num_make_value_helper): Use inferior_thread.
533 * top.c (execute_command): Use inferior_thread.
534 * tui/tui-interp.c: Include "inferior.h".
535 * varobj.c (varobj_create): Use inferior_thread.
536 (value_of_root_1): Use find_thread_global_id instead of
537 global_thread_id_to_ptid.
539 2018-06-21 Alan Hayward <alan.hayward@arm.com>
541 * regcache.c (readable_regcache::read_part): Avoid memcpy when
543 (regcache::write_part): Likewise.
544 (readable_regcache::cooked_read_part): Update comment.
545 (readable_regcache::cooked_write_part): Likewise.
546 * regcache.h: (readable_regcache::read_part): Likewise.
547 (regcache::write_part): Likewise.
549 2018-06-21 Richard Bunt <richard.bunt@arm.com>
550 Dirk Schubert <dirk.schubert@arm.com>
552 * aarch64-linux-nat.c (post_attach): New.
553 (aarch64_linux_nat_target::post_attach): Override post_attach to
554 record the number of hardware debug registers.
556 2018-06-20 Tom Tromey <tom@tromey.com>
558 * python/py-param.c (add_setshow_generic): Make parameters const.
559 (parmpy_init): Update.
561 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
563 * regcache.h (regcache_cooked_read_ftype): Rename to...
564 (register_read_ftype): ...this, change type to function_view.
565 (class reg_buffer) <save>: Remove src parameter.
566 (readonly_detached_regcache) <readonly_detached_regcache>: Make
567 parameter non-const in first overload. Remove src parameter in
569 * regcache.c (do_cooked_read): Remove.
570 (readonly_detached_regcache::readonly_detached_regcache): Make
571 parameter non-const, adjust call to other constructor.
572 (reg_buffer::save): Remove src parameter.
573 * frame.c (do_frame_register_read): Remove.
574 (frame_save_as_regcache): Use lambda function.
575 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
576 parameter to ppu2spu_data *.
577 (ppu2spu_sniffer): Use lambda function.
579 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
581 * record-full.c (record_full_target::insert_breakpoint): Remove
582 "struct" keyword, add const.
584 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
586 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
587 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
588 * configure.ac: Remove AC_PREREQ, add missing quoting.
589 * gnulib/configure.ac: Modernize usage of
590 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
591 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
592 (AUTOMAKE_VERSION): Bump to 1.15.1.
593 * configure: Re-generate.
594 * config.in: Re-generate.
595 * aclocal.m4: Re-generate.
596 * gnulib/aclocal.m4: Re-generate.
597 * gnulib/config.in: Re-generate.
598 * gnulib/configure: Re-generate.
599 * gnulib/import/Makefile.in: Re-generate.
601 2018-06-19 Pedro Alves <palves@redhat.com>
603 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
604 (lookup_minimal_symbol_by_pc_section): ... here with
605 gdb_assert_not_reached added.
607 2018-06-19 Pedro Alves <palves@redhat.com>
609 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
610 parameter with a block parameter. Compare location's block symbol
611 with the frame's block instead of addresses.
612 (skip_inline_frames): Pass the current block instead of the
613 frame's address. Break out as soon as we determine the frame
614 should not be skipped.
616 2018-06-18 Tom Tromey <tom@tromey.com>
618 * solib-aix.c (solib_aix_get_section_offsets): Return
620 (solib_aix_solib_create_inferior_hook): Update.
622 2018-06-18 Tom Tromey <tom@tromey.com>
624 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
626 2018-06-18 Tom Tromey <tom@tromey.com>
628 * solib-frv.c (frv_relocate_main_executable): Use
630 * solib-dsbt.c (dsbt_relocate_main_executable): Use
633 2018-06-18 Tom Tromey <tom@tromey.com>
635 * objfiles.h (inhibit_section_map_updates): Update.
636 (resume_section_map_updates, resume_section_map_updates_cleanup):
638 * solib-svr4.c (svr4_handle_solib_event): Update.
639 * objfiles.c (inhibit_section_map_updates): Return
640 scoped_restore_tmpl<int>.
641 (resume_section_map_updates, resume_section_map_updates_cleanup):
644 2018-06-18 Tom Tromey <tom@tromey.com>
646 * valprint.h (read_string): Update.
647 * valprint.c (read_string): Change type of "buffer".
648 (val_print_string): Update.
649 * python/py-value.c (valpy_string): Update.
650 * language.h (struct language_defn) <la_get_string>: Change
652 (default_get_string, c_get_string): Update.
653 * language.c (default_get_string): Change type of "buffer".
654 * guile/scm-value.c (gdbscm_value_to_string): Update.
655 * c-lang.c (c_get_string): Change type of "buffer".
657 2018-06-18 Tom Tromey <tom@tromey.com>
659 * ser-mingw.c (struct pipe_state_destroyer): New.
660 (pipe_state_up): New typedef.
661 (cleanup_pipe_state): Remove.
662 (pipe_windows_open): Use pipe_state_up. Don't release argv.
664 2018-06-18 Tom Tromey <tom@tromey.com>
666 * rust-lang.h (rust_yyerror): Don't declare.
667 * rust-lang.c (rust_language_defn): Update.
668 * rust-exp.y (yyerror): Now static.
669 * parse.c (parse_exp_in_context_1): Update.
670 * p-lang.h (p_yyerror): Don't declare.
671 * p-lang.c (p_language_defn): Update.
672 * p-exp.y (yyerror): Now static.
673 * opencl-lang.c (opencl_language_defn): Update.
674 * objc-lang.c (objc_language_defn): Update.
675 * m2-lang.h (m2_yyerror): Don't declare.
676 * m2-lang.c (m2_language_defn): Update.
677 * m2-exp.y (yyerror): Now static.
678 * language.h (struct language_defn) <la_error>: Remove.
679 * language.c (unk_lang_error): Remove.
680 (unknown_language_defn, auto_language_defn): Remove.
681 * go-lang.h (go_yyerror): Don't declare.
682 * go-lang.c (go_language_defn): Update.
683 * go-exp.y (yyerror): Now static.
684 * f-lang.h (f_yyerror): Don't declare.
685 * f-lang.c (f_language_defn): Update.
686 * f-exp.y (yyerror): Now static.
687 * d-lang.h (d_yyerror): Don't declare.
688 * d-lang.c (d_language_defn): Update.
689 * d-exp.y (yyerror): Now static.
690 * c-lang.h (c_yyerror): Don't declare.
691 * c-lang.c (c_language_defn, cplus_language_defn)
692 (asm_language_defn, minimal_language_defn): Update.
693 * c-exp.y (yyerror): Now static.
694 * ada-lang.h (ada_yyerror): Don't declare.
695 * ada-lang.c (ada_language_defn): Update.
696 * ada-exp.y (yyerror): Now static.
698 2018-06-18 Alan Hayward <alan.hayward@arm.com>
700 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
701 (store_sveregs_to_thread): Likewise.
702 (aarch64_linux_fetch_inferior_registers): Check for SVE.
703 (aarch64_linux_store_inferior_registers): Likewise.
704 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
706 (aarch64_sve_regs_copy_to_regcache): Likewise.
707 (aarch64_sve_regs_copy_from_regcache): Likewise.
708 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
710 (aarch64_sve_regs_copy_to_regcache): Likewise.
711 (aarch64_sve_regs_copy_from_regcache): Likewise.
712 (sve_context): Structure from Linux headers.
713 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
714 (SVE_SIG_ZREG_SIZE): Likewise.
715 (SVE_SIG_PREG_SIZE): Likewise.
716 (SVE_SIG_FFR_SIZE): Likewise.
717 (SVE_SIG_REGS_OFFSET): Likewise.
718 (SVE_SIG_ZREGS_OFFSET): Likewise.
719 (SVE_SIG_ZREG_OFFSET): Likewise.
720 (SVE_SIG_ZREGS_SIZE): Likewise.
721 (SVE_SIG_PREGS_OFFSET): Likewise.
722 (SVE_SIG_PREG_OFFSET): Likewise.
723 (SVE_SIG_PREGS_SIZE): Likewise.
724 (SVE_SIG_FFR_OFFSET): Likewise.
725 (SVE_SIG_REGS_SIZE): Likewise.
726 (SVE_SIG_CONTEXT_SIZE): Likewise.
727 (SVE_PT_REGS_MASK): Likewise.
728 (SVE_PT_REGS_FPSIMD): Likewise.
729 (SVE_PT_REGS_SVE): Likewise.
730 (SVE_PT_VL_INHERIT): Likewise.
731 (SVE_PT_VL_ONEXEC): Likewise.
732 (SVE_PT_REGS_OFFSET): Likewise.
733 (SVE_PT_FPSIMD_OFFSET): Likewise.
734 (SVE_PT_FPSIMD_SIZE): Likewise.
735 (SVE_PT_SVE_ZREG_SIZE): Likewise.
736 (SVE_PT_SVE_PREG_SIZE): Likewise.
737 (SVE_PT_SVE_FFR_SIZE): Likewise.
738 (SVE_PT_SVE_FPSR_SIZE): Likewise.
739 (SVE_PT_SVE_FPCR_SIZE): Likewise.
740 (__SVE_SIG_TO_PT): Likewise.
741 (SVE_PT_SVE_OFFSET): Likewise.
742 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
743 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
744 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
745 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
746 (SVE_PT_SVE_PREG_OFFSET): Likewise.
747 (SVE_PT_SVE_PREGS_SIZE): Likewise.
748 (SVE_PT_SVE_FFR_OFFSET): Likewise.
749 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
750 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
751 (SVE_PT_SVE_SIZE): Likewise.
752 (SVE_PT_SIZE): Likewise.
753 (HAS_SVE_STATE): New define.
755 2018-06-18 Alan Hayward <alan.hayward@arm.com>
757 * nat/aarch64-sve-linux-sigcontext.h: New file.
758 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
760 (SVE_VQ_MIN): Likewise.
761 (SVE_VQ_MAX): Likewise.
762 (SVE_VL_MIN): Likewise.
763 (SVE_VL_MAX): Likewise.
764 (SVE_NUM_ZREGS): Likewise.
765 (SVE_NUM_PREGS): Likewise.
766 (sve_vl_valid): Likewise.
767 (struct user_sve_header): Likewise.
769 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
770 Richard Bunt <Richard.Bunt@arm.com>
772 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
773 was requested by GDB.
775 2018-06-15 Tom de Vries <tdevries@suse.de>
777 * MAINTAINERS (Write After Approval): Add Tom de Vries.
779 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
781 * gnulib/update-gnulib.sh: Print expected versions of
784 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
786 * arch-utils.c (default_type_align): Use type_length_units.
787 * gdbtypes.c (type_align): Use type_length_units.
789 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
791 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
794 2018-06-14 Tom de Vries <tdevries@suse.de>
797 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
798 get_no_prettyformat_print_options.
800 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
802 * sparc-nat.h: Include target.h.
803 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
804 <fetch_registers>: Remove this argument in function call.
805 <store_registers>: Remove this argument in function call, remove
807 <low_forget_process>: Call sparc64_forget_process instead of
808 sparc_forget_process.
810 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
812 * procfs.c (_initialize_procfs): Use add_inf_child_target.
813 (procfs_target::make_corefile_notes): Adjust to new
814 target_read_alloc return type.
816 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
817 Stephen Roberts <stephen.roberts@arm.com>
820 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
821 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
822 Move should_notify_stop local into more inner scope.
824 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
825 Stephen Roberts <stephen.roberts@arm.com>
828 * infrun.c (resume_1): Add call to mark_async_event_handler.
830 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
832 * infrun.c (do_target_wait): Change old version of $pc printed.
834 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
836 * dwarf2read.c (read_index_from_section): Rename to...
837 (read_gdb_index_from_section): ... this, update all callers.
838 (dwarf2_read_index): Rename to...
839 (dwarf2_read_gdb_index): ... this, update all callers.
841 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
843 * gdb/hppa-linux-nat.c
844 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
845 hppa_linux_nat_target::fetch_registers.
847 2018-06-11 Alan Hayward <alan.hayward@arm.com>
849 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
850 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
851 (AARCH64_DWARF_SVE_FFR): Likewise.
852 (AARCH64_DWARF_SVE_P0): Likewise.
853 (AARCH64_DWARF_SVE_Z0): Likewise.
855 2018-06-11 Alan Hayward <alan.hayward@arm.com>
857 * common/common-regcache.h (raw_compare): New function.
858 * regcache.c (regcache::raw_compare): Likewise.
859 * regcache.h (regcache::raw_compare): New declaration.
861 2018-06-11 Alan Hayward <alan.hayward@arm.com>
863 * common/common-regcache.h (reg_buffer_common): New structure.
864 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
865 (reg_buffer::raw_supply): Likewise.
866 (reg_buffer::raw_supply_integer): Likewise.
867 (reg_buffer::raw_supply_zeroed): Likewise.
868 (reg_buffer::raw_collect): Likewise.
869 (reg_buffer::raw_collect_integer): Likewise.
870 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
871 (reg_buffer::raw_supply): Likewise.
872 (reg_buffer::raw_supply_integer): Likewise.
873 (reg_buffer::raw_supply_zeroed): Likewise.
874 (reg_buffer::raw_collect): Likewise.
875 (reg_buffer::raw_collect_integer): Likewise.
877 2018-06-10 Tom Tromey <tom@tromey.com>
879 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
880 (class remote_state) <stop_reply_queue>: Now std::vector.
881 (remote_state::~remote_state)
882 (remote_target::stop_reply_queue_length): Update.
883 (struct queue_iter_param, remove_child_of_pending_fork)
884 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
885 (check_pending_event_prevents_wildcard_vcont_callback)
886 (remove_stop_reply_for_inferior)
887 (remove_stop_reply_of_remote_state)
888 (remote_notif_remove_once_on_match)
889 (stop_reply_match_ptid_and_ws)
890 (remote_kill_child_of_pending_fork): Remove.
891 (remote_target::remove_new_fork_children)
892 (remote_target::check_pending_events_prevent_wildcard_vcont)
893 (remote_target::discard_pending_stop_replies)
894 (remote_target::discard_pending_stop_replies_in_queue)
895 (remote_target::remote_notif_remove_queued_reply)
896 (remote_target::queued_stop_reply)
897 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
898 (remote_target::wait, remote_target::kill_new_fork_children)
899 (remote_target::async): Update.
901 2018-06-10 Tom Tromey <tom@tromey.com>
903 * record-full.c (record_full_arch_list_cleanups): Remove.
904 (record_full_message): Use try/catch.
905 (record_full_wait_cleanups): Remove.
906 (record_full_wait_1): Use try/catch.
907 (record_full_restore): Likewise.
909 2018-06-10 Tom Tromey <tom@tromey.com>
911 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
912 declare VEC. Add constructor.
913 <in_target_beneath>: Now bool.
914 (record_full_breakpoints): Now a std::vector, static.
915 (record_full_sync_record_breakpoints)
916 (record_full_init_record_breakpoints)
917 (record_full_target::insert_breakpoint)
918 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
920 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
922 * dwarf2read.c (process_cu_includes): Remove struct keyword.
923 * serial.c (serial_interface_lookup): Remove struct keyword.
925 2018-06-10 Tom Tromey <tom@tromey.com>
927 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
929 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
931 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
933 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
934 "beneath" as a method.
935 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
936 Use "beneath" as a method.
938 2018-06-10 Tom Tromey <tom@tromey.com>
940 * tracefile.c (struct trace_file_writer_deleter): New.
941 <operator()>: Rename from trace_file_writer_xfree.
942 (trace_file_writer_up): New typedef.
943 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
945 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
947 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
948 <m_registers, m_register_status>: Change type to
950 * regcache.c (reg_buffer::reg_buffer): Use new instead of
953 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
955 * common/common-regcache.h (enum register_status): Add
956 underlying type "signed char".
957 * regcache.h (reg_buffer) <m_register_status>: Change type to
959 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
960 register_status instead of signed char.
961 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
962 (reg_buffer::get_register_status): Remove cast.
963 (readable_regcache::raw_read): Remove cast.
964 (readable_regcache::cooked_read): Remove cast.
966 2018-06-09 Tom Tromey <tom@tromey.com>
968 * source.c (reverse_search_command, forward_search_command): Use
971 2018-06-09 Tom Tromey <tom@tromey.com>
973 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
974 (serial_ops_list): Now static, std::vector.
975 (serial_interface_lookup, serial_add_interface): Update.
977 2018-06-09 Tom Tromey <tom@tromey.com>
979 * dwarf2read.c (process_cu_includes): Update.
980 (process_full_comp_unit): Update.
981 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
984 2018-06-08 Paul Koning <paul_koning@dell.com>
988 * python/python.c (do_start_initialization):
989 Avoid call to internal Python API.
990 (init__gdb_module): New function.
992 2018-06-08 Gary Benson <gbenson@redhat.com>
994 * linux-thread-db.c (valprint.h): New include.
995 (struct check_thread_db_info): New structure.
996 (check_thread_db_on_load, tdb_testinfo): New static globals.
997 (check_thread_db, check_thread_db_callback): New functions.
998 (try_thread_db_load_1): Run integrity checks if requested.
999 (maintenance_check_libthread_db): New function.
1000 (_initialize_thread_db): Register "maint check libthread-db"
1001 and "maint set/show check-libthread-db".
1002 * NEWS: Mention the above new commands.
1004 2018-06-08 Tom Tromey <tom@tromey.com>
1006 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1009 2018-06-08 Tom Tromey <tom@tromey.com>
1011 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1013 2018-06-08 Tom Tromey <tom@tromey.com>
1015 * common/btrace-common.h (struct btrace_data): Add constructor,
1016 destructor, move assignment operator.
1017 <empty, clear, fini>: New methods.
1018 <format>: Initialize.
1019 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1020 (btrace_data_empty): Don't declare.
1021 * common/btrace-common.c (btrace_data_init): Remove.
1022 (btrace_data::fini): Rename from btrace_data_fini.
1023 (btrace_data::empty): Rename from btrace_data_empty.
1024 (btrace_data::clear): Rename from btrace_data_clear. Return
1026 * btrace.h (make_cleanup_btrace_data): Don't declare.
1027 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1028 (parse_xml_btrace): Update.
1029 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1030 (maint_btrace_clear_packet_history_cmd): Update.
1032 2018-06-07 Pedro Alves <palves@redhat.com>
1034 * target.h (target_ops) <beneath>: Now a method. All references
1036 (class target_stack): New.
1037 * target.c (g_target_stack): New.
1038 (g_current_top_target): Delete.
1039 (current_top_target): Get the top target out of g_target_stack.
1040 (target_stack::push, target_stack::unpush): New.
1041 (push_target, unpush_target): Reimplement.
1042 (target_is_pushed): Reimplement in terms of g_target_stack.
1043 (target_ops::beneath, target_stack::find_beneath): New.
1045 2018-06-07 Pedro Alves <palves@redhat.com>
1047 * target.h (find_target_beneath): Delete declaration.
1048 * target.c (find_target_beneath): Delete definition.
1049 * aix-thread.c: All callers of find_target_beneath adjusted to
1050 call target_ops::beneath instead.
1051 * bsd-uthread.c: Likewise.
1052 * linux-thread-db.c: Likewise.
1053 * ravenscar-thread.c: Likewise.
1054 * sol-thread.c: Likewise.
1055 * spu-multiarch.c: Likewise.
1057 2018-06-07 Pedro Alves <palves@redhat.com>
1059 * target.h (target_ops) <beneath>: Now a method. All references
1061 (target_ops) <m_beneath>: New.
1062 * target.c (target_ops::beneath): New.
1063 * corelow.c: Adjust all references to target_ops::beneath.
1064 * linux-thread-db.c: Likewise.
1065 * make-target-delegates: Likewise.
1066 * record-btrace.c: Likewise.
1067 * record-full.c: Likewise.
1068 * remote.c: Likewise.
1069 * target.c: Likewise.
1070 * target-delegates.c: Regenerate.
1072 2018-06-07 Pedro Alves <palves@redhat.com>
1074 * target.h (target_stack): Delete.
1075 (current_top_target): Declare function.
1076 * target.c (target_stack): Delete.
1077 (g_current_top_target): New.
1078 (current_top_target): New function.
1079 * auxv.c: Use current_top_target instead of target_stack
1081 * avr-tdep.c: Likewise.
1082 * breakpoint.c: Likewise.
1083 * corefile.c: Likewise.
1084 * elfread.c: Likewise.
1086 * exceptions.c: Likewise.
1087 * frame.c: Likewise.
1088 * gdbarch-selftests.c: Likewise.
1089 * gnu-v3-abi.c: Likewise.
1090 * ia64-tdep.c: Likewise.
1091 * ia64-vms-tdep.c: Likewise.
1092 * infcall.c: Likewise.
1093 * infcmd.c: Likewise.
1094 * infrun.c: Likewise.
1095 * linespec.c: Likewise.
1096 * linux-tdep.c: Likewise.
1097 * minsyms.c: Likewise.
1098 * ppc-linux-nat.c: Likewise.
1099 * ppc-linux-tdep.c: Likewise.
1100 * procfs.c: Likewise.
1101 * regcache.c: Likewise.
1102 * remote.c: Likewise.
1103 * rs6000-tdep.c: Likewise.
1104 * s390-linux-nat.c: Likewise.
1105 * s390-tdep.c: Likewise.
1106 * solib-aix.c: Likewise.
1107 * solib-darwin.c: Likewise.
1108 * solib-dsbt.c: Likewise.
1109 * solib-spu.c: Likewise.
1110 * solib-svr4.c: Likewise.
1111 * solib-target.c: Likewise.
1112 * sparc-tdep.c: Likewise.
1113 * sparc64-tdep.c: Likewise.
1114 * spu-tdep.c: Likewise.
1115 * symfile.c: Likewise.
1116 * symtab.c: Likewise.
1117 * target-descriptions.c: Likewise.
1118 * target-memory.c: Likewise.
1119 * target.c: Likewise.
1120 * target.h: Likewise.
1121 * tracefile-tfile.c: Likewise.
1122 * tracepoint.c: Likewise.
1123 * valops.c: Likewise.
1124 * valprint.c: Likewise.
1125 * value.c: Likewise.
1126 * windows-tdep.c: Likewise.
1127 * mi/mi-main.c: Likewise.
1129 2018-06-07 Tom Tromey <tom@tromey.com>
1131 * valprint.h (build_address_symbolic): Declare.
1132 * printcmd.c (print_address_symbolic): Update.
1133 (build_address_symbolic): Change "name" and "filename" to
1135 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1137 * defs.h (build_address_symbolic): Remove declaration.
1139 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1141 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1142 (aarch64_vnv_type): Add function.
1143 (aarch64_pseudo_register_name): Add V regs for SVE.
1144 (aarch64_pseudo_register_type): Likewise.
1145 (aarch64_pseudo_register_reggroup_p): Likewise.
1146 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1147 (aarch64_pseudo_read_value): Add V regs for SVE.
1148 (aarch64_pseudo_write_2): Use V0 offset for SVE
1149 (aarch64_pseudo_write): Add V regs for SVE.
1150 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1152 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1154 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1155 (sve_vl_from_vq): Likewise.
1157 2018-06-05 Tom Tromey <tom@tromey.com>
1159 * cli/cli-cmds.c (show_version): Update.
1160 * top.c (print_gdb_version): Add "interactive" parameter.
1162 * main.c (captured_main_1): Update.
1163 * top.h (print_gdb_version): Add "interactive" parameter and a
1166 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1168 * common/enum-flags.h: Add trailing semicolon to example in
1171 2018-06-05 Tom Tromey <tom@tromey.com>
1174 * NEWS: Add entry about pager.
1175 * utils.c (pagination_disabled_for_command): New global.
1176 (prompt_for_continue): Allow "c" response to prompt.
1177 (reinitialize_more_filter): Clear
1178 pagination_disabled_for_command.
1179 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1181 2018-06-04 Tom Tromey <tom@tromey.com>
1183 * ada-lang.h (ada_lookup_symbol_list): Update.
1184 * ada-lang.c (resolve_subexp): Update.
1185 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1187 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1188 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1189 results parameter to std::vector.
1190 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1192 * ada-exp.y (block_lookup): Update.
1193 (select_possible_type_sym): Change type of syms. Remove nsyms
1195 (write_var_or_type, write_name_assoc): Update.
1197 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1199 * windows-nat.c (windows_nat_target::xfer_partial): Return
1200 TARGET_XFER_E_IO if we need to delegate to the target beneath
1201 but BENEATH is NULL.
1203 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1205 * Makefile.in (config.status): Add configure.nat as a
1208 2018-06-04 Tom Tromey <tom@tromey.com>
1210 * cp-name-parser.y (cpname_state): Add method declarations.
1211 (HANDLE_QUAL): Update.
1212 (cpname_state::d_grab, cpname_state::fill_comp)
1213 (cpname_state::make_operator, cpname_state::make_dtor)
1214 (cpname_state::make_builtin_type, cpname_state::make_name)
1215 (cpname_state::d_qualify, cpname_state::d_int_type)
1216 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1217 (%union): Move earlier.
1219 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1221 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1223 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1225 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1226 (aarch64_pseudo_write_1): Likewise.
1227 (aarch64_pseudo_read_value): Use helper.
1228 (aarch64_pseudo_write): Likewise.
1230 2018-06-04 Pedro Alves <palves@redhat.com>
1232 * darwin-nat.c (darwin_ops): Delete.
1233 (darwin_attach_pid): Use get_native_target.
1235 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1237 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1238 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1240 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1242 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1243 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1244 (aarch64_gdbarch_init): Check for SVE.
1245 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1247 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1249 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1250 * aarch64-tdep.h (aarch64_read_description): Likewise.
1251 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1252 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1253 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1254 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1255 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1257 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1259 * value.c (value_fetch_lazy_bitfield): New.
1260 (value_fetch_lazy_memory): New.
1261 (value_fetch_lazy_register): New.
1262 (value_fetch_lazy): Factor out to smaller functions.
1264 2018-06-01 Tom Tromey <tom@tromey.com>
1266 * cp-name-parser.y (backslashable, represented): Now const.
1268 2018-06-01 Tom Tromey <tom@tromey.com>
1270 * cp-name-parser.y: Include parser-defs.h.
1271 (parser_fprintf): Remove declaration.
1273 2018-06-01 Tom Tromey <tom@tromey.com>
1275 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1277 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1278 (global_result): Remove globals.
1279 (struct cpname_state): New.
1280 (yyparse): Don't declare.
1281 (yylex, yyerror): Move declarations after %union.
1282 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1283 (make_name): Add state parameter.
1285 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1287 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1289 (yylex): Add lvalp, state parameters.
1290 (yyerror): Add state parameter.
1291 (cp_demangled_name_to_comp): Update.
1293 2018-06-01 Tom Tromey <tom@tromey.com>
1295 * cp-name-parser.y (parser_fprintf): Declare.
1296 (GDB_YY_REMAP_PREFIX): Define.
1297 Include yy-remap.h. Don't redefine yy* identifiers.
1299 2018-06-01 Tom Tromey <tom@tromey.com>
1301 * python/py-type.c (typy_legacy_template_argument): Update.
1302 * cp-support.h (cp_demangled_name_to_comp): Update.
1303 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
1304 parameter to be a "std::string *".
1307 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1309 * ada-lex.l: Include "diagnostics.h" instead of
1310 "common/diagnostics.h".
1311 * unittests/environ-selftests.c: Likewise.
1312 * common/diagnostics.h: Moved to ../include.
1314 2018-06-01 Joel Brobecker <brobecker@adacore.com>
1316 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
1317 to language_mode_manual while calling breakpoint_re_set_one.
1319 2018-06-01 Tom Tromey <tom@tromey.com>
1321 * valops.c (value_cast_structs, destructor_name_p): Update.
1322 * symtab.c (gdb_mangle_name): Update.
1323 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
1325 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
1326 (pascal_object_print_value_fields, pascal_object_print_value):
1328 * p-typeprint.c (pascal_type_print_derivation_info): Update.
1329 * linespec.c (find_methods): Update.
1330 * gdbtypes.h (type_name_no_tag): Remove.
1331 (type_name_or_error): Rename from type_name_no_tag_or_error.
1332 * gdbtypes.c (type_name_no_tag): Remove.
1333 (type_name_or_error): Rename from type_name_no_tag_or_error.
1334 (lookup_struct_elt_type, check_typedef): Update.
1335 * expprint.c (print_subexp_standard): Update.
1336 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
1337 * d-namespace.c (d_lookup_nested_symbol): Update.
1338 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
1339 (cp_print_class_member): Update.
1340 * cp-namespace.c (cp_lookup_nested_symbol): Update.
1341 * completer.c (add_struct_fields): Update.
1342 * c-typeprint.c (cp_type_print_derivation_info)
1343 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
1345 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
1346 (ada_prefer_type, ada_is_exception_sym): Update.
1348 2018-06-01 Tom Tromey <tom@tromey.com>
1350 * valops.c (enum_constant_from_type, value_namespace_elt)
1351 (value_maybe_namespace_elt): Update.
1352 * valarith.c (find_size_for_pointer_math): Update.
1353 * target-descriptions.c (make_gdb_type): Update.
1354 * symmisc.c (print_symbol): Update.
1355 * stabsread.c (define_symbol, read_type)
1356 (complain_about_struct_wipeout, add_undefined_type)
1357 (cleanup_undefined_types_1): Update.
1358 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
1359 (rust_range_type_p, val_print_struct, rust_print_struct_def)
1360 (rust_internal_print_type, rust_composite_type)
1361 (rust_evaluate_funcall, rust_evaluate_subexp)
1362 (rust_inclusive_range_type_p): Update.
1363 * python/py-type.c (typy_get_tag): Update.
1364 * p-typeprint.c (pascal_type_print_base): Update.
1365 * mdebugread.c (parse_symbol, parse_type): Update.
1366 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
1368 * guile/scm-type.c (gdbscm_type_tag): Update.
1369 * go-lang.c (sixg_string_p): Update.
1370 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
1372 * gdbtypes.h (struct main_type) <tag_name>: Remove.
1373 (TYPE_TAG_NAME): Remove.
1374 * gdbtypes.c (type_name_no_tag): Simplify.
1375 (check_typedef, check_types_equal, recursive_dump_type)
1376 (copy_type_recursive, arch_composite_type): Update.
1377 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
1378 in summary mode when needed.
1379 * eval.c (evaluate_funcall): Update.
1380 * dwarf2read.c (fixup_go_packaging, read_structure_type)
1381 (process_structure_scope, read_enumeration_type)
1382 (read_namespace_type, read_module_type, determine_prefix): Update.
1383 * cp-support.c (inspect_type): Update.
1384 * coffread.c (process_coff_symbol, decode_base_type): Update.
1385 * c-varobj.c (c_is_path_expr_parent): Update.
1386 * c-typeprint.c (c_type_print_base_struct_union): Update.
1387 (c_type_print_base_1): Update. Print struct/class/union/enum in
1388 summary when using C language.
1389 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
1390 (gen_maybe_namespace_elt): Update.
1391 * ada-lang.c (ada_type_name): Simplify.
1392 (empty_record, ada_template_to_fixed_record_type_1)
1393 (template_to_static_fixed_type)
1394 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
1396 2018-06-01 Tom Tromey <tom@tromey.com>
1398 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
1400 * c-typeprint.c (c_print_type_1): Add "language" parameter.
1401 (c_print_type): Update.
1402 (c_print_type): New overload.
1403 (c_type_print_varspec_prefix, c_type_print_args)
1404 (c_type_print_varspec_suffix, c_print_type_no_offsets)
1405 (c_type_print_base_struct_union, c_type_print_base_1)
1406 (cp_type_print_method_args): Add "language" parameter.
1407 (c_type_print_base): Update.
1408 * c-lang.h (c_print_type): Add new overload.
1410 2018-06-01 Tom Tromey <tom@tromey.com>
1412 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
1413 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
1415 2018-06-01 Alan Hayward <alan.hayward@arm.com>
1417 * aarch64-tdep.c (aarch64_sve_register_names): New const
1419 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
1420 (AARCH64_SVE_Z_REGS_NUM): New define.
1421 (AARCH64_SVE_P_REGS_NUM): Likewise.
1422 (AARCH64_SVE_NUM_REGS): Likewise.
1424 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
1426 * nat/linux-ptrace.h [__alpha__]
1427 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
1430 2018-05-31 Maciej W. Rozycki <macro@mips.com>
1432 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
1433 the endianness selected.
1434 * NEWS: Document `set endian auto' mode operation update.
1436 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1438 * Makefile.in: Add new header.
1439 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
1440 (sve_vl_from_vg): Likewise.
1441 (sve_vq_from_vl): Likewise.
1442 (sve_vl_from_vq): Likewise.
1443 (sve_vq_from_vg): Likewise.
1444 (sve_vg_from_vq): Likewise.
1445 * configure.nat: Add new c file.
1446 * nat/aarch64-sve-linux-ptrace.c: New file.
1447 * nat/aarch64-sve-linux-ptrace.h: New file.
1449 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1451 * aarch64-linux-nat.c (aarch64_linux_read_description):
1453 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1455 * aarch64-tdep.c (tdesc_aarch64_list): Add.
1456 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
1457 (aarch64_gdbarch_init): Add parmeter zero.
1458 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
1459 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
1460 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
1462 * doc/gdb.texinfo: Describe SVE feature
1463 * features/aarch64-sve.c: New file.
1465 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
1468 * gdbarch.sh (significant_addr_bit): Default to zero when
1469 not set by target architecture.
1470 * gdbarch.c: Re-generated.
1471 * utils.c (address_significant): Update.
1473 2018-05-30 Joel Brobecker <brobecker@adacore.com>
1475 * stack.c (func_command): Remove trailing newline in call to error.
1477 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1479 * regcache.h (regcache_raw_collect): Remove, update callers to
1480 use regcache::raw_collect.
1481 * regcache.c (regcache_raw_collect): Remove.
1483 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1485 * regcache.h (regcache_raw_supply): Remove, update callers to
1486 use detached_regcache::raw_supply.
1487 * regcache.c (regcache_raw_supply): Remove.
1489 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1491 * regcache.h (regcache_cooked_write_part): Remove, update
1492 callers to use regcache::cooked_write_part.
1493 * regcache.c (regcache_cooked_write_part): Remove.
1495 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1497 * regcache.h (regcache_cooked_read_part): Remove, update callers
1498 to use readable_regcache::cooked_read_part.
1499 * regcache.c (regcache_cooked_read_part): Remove.
1501 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1503 * regcache.h (regcache_cooked_read_value): Remove, update
1504 callers to use readable_regcache::cooked_read_value.
1505 * regcache.c (regcache_cooked_read_value): Remove.
1507 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1509 * regcache.h (regcache_cooked_write): Remove, update callers to
1510 use regcache::cooked_write.
1511 * regcache.c (regcache_cooked_write): Remove.
1513 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1515 * regcache.h (regcache_invalidate): Remove, update callers to
1516 use detached_regcache::invalidate instead.
1517 * regcache.c (regcache_invalidate): Remove.
1519 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1521 * regcache.h (regcache_raw_write_part): Remove, update callers
1522 to use regcache::raw_write_part instead.
1523 * regcache.c (regcache_raw_write_part): Remove.
1525 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1527 * regcache.h (regcache_raw_read_part): Remove, update callers to
1528 use readable_regcache::raw_read_part instead.
1529 * regcache.c (regcache_raw_read_part): Remove.
1531 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1533 * regcache.h (regcache_cooked_read): Remove, update callers to
1534 use readable_regcache::cooked_read instead.
1535 * regcache.c (regcache_cooked_read): Remove.
1537 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1539 * regcache.h (regcache_raw_write): Remove, update callers to use
1540 regcache::raw_write instead.
1541 * regcache.c (regcache_raw_write): Remove.
1543 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1545 * regcache.h (regcache_raw_read): Remove, update callers to use
1546 readable_regcache::raw_read instead.
1547 * regcache.c (regcache_raw_read): Remove.
1549 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1551 * regcache.h (regcache_raw_update): Remove, update callers to
1552 use readable_regcache::raw_update instead.
1553 * regcache.c (regcache_raw_update): Remove.
1555 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1557 * regcache.h (regcache_register_status): Remove, update callers
1558 to use reg_buffer::get_register_status directly instead.
1559 * regcache.c (regcache_register_status): Remove.
1561 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1563 * regcache.h (regcache_get_ptid): Remove, update all callers to
1564 call regcache::ptid instead.
1565 * regcache.c (regcache_get_ptid): Remove.
1567 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
1569 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
1571 2018-05-30 Pedro Alves <palves@redhat.com>
1573 * common/common-exceptions.h (exception_rethrow): Use
1576 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
1578 * breakpoint.c (print_solib_event, check_status_catch_solib):
1579 Remove struct keyword in range-based for loops.
1580 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
1581 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
1583 * linespec.c (find_superclass_methods, search_minsyms_for_name):
1585 * symfile.c (addr_info_make_relative): Likewise.
1586 * thread.c (value_in_thread_stack_temporaries): Likewise.
1588 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
1591 * valops.c (value_struct_elt_for_reference): Call check_typedef on
1592 aggregate type to get its real type before accessing it.
1594 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
1596 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
1597 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
1598 * coff-pe-read.c (add_pe_forwarded_sym): Replace
1599 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
1600 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
1601 * jit.c (jit_breakpoint_re_set_internal): Likewise.
1602 * printcmd.c (info_address_command): Likewise.
1604 2018-05-29 Tom Tromey <tom@tromey.com>
1606 * windows-nat.c (handle_exception): Update fall-through comment.
1608 2018-05-29 Tom Tromey <tom@tromey.com>
1610 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
1611 (struct program_space) <added_solibs>: Now a std::vector.
1612 * breakpoint.c (print_solib_event): Update.
1613 (check_status_catch_solib): Update.
1614 * progspace.c (clear_program_space_solib_cache): Update.
1615 * solib.c (update_solib_list): Update.
1617 2018-05-29 Tom Tromey <tom@tromey.com>
1619 * python/py-type.c (typy_richcompare): Update.
1620 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
1621 * gdbtypes.h (types_deeply_equal): Return bool.
1622 (types_equal): Likewise.
1623 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
1625 (check_types_equal): Change worklist to std::vector. Return
1627 (struct type_equality_entry): Add constructor.
1628 (compare_maybe_null_strings): Return bool.
1629 (check_types_worklist): Return bool. Change worklist to
1631 (types_deeply_equal): Use std::vector.
1632 (types_equal): Return bool.
1633 (compare_maybe_null_strings): Simplify.
1635 2018-05-29 Tom Tromey <tom@tromey.com>
1637 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1639 2018-05-29 Tom Tromey <tom@tromey.com>
1641 * objc-lang.h: Don't include cp-support.h.
1642 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1645 2018-05-27 Tom Tromey <tom@tromey.com>
1647 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1649 2018-05-25 Tom Tromey <tom@tromey.com>
1651 * value.c (value::location): Initialize.
1653 2018-05-25 Tom Tromey <tom@tromey.com>
1655 * dbxread.c (init_bincl_list): Remove.
1656 (bincl_list): Now a std::vector.
1657 (bincls_allocated, next_bincl): Remove.
1658 (free_bincl_list, do_free_bincl_list_cleanup)
1659 (make_cleanup_free_bincl_list): Remove.
1660 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1662 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1663 (struct header_file_location): Add constructor.
1664 (add_bincl_to_list): Remove.
1666 2018-05-25 Tom Tromey <tom@tromey.com>
1668 * tui/tui.c (tui_enable): Update.
1669 * mi/mi-interp.c (mi_interp::init): Update.
1670 * interps.h (class interp) <name>: New method.
1671 <m_name>: Rename from name.
1672 (~scoped_restore_interp): Update.
1673 * interps.c (interp::interp): Update.
1674 (interp_add, interp_set, interp_lookup_existing)
1675 (current_interp_named_p): Update.
1677 2018-05-25 Tom Tromey <tom@tromey.com>
1679 * interps.c (interp_name): Remove.
1680 * mi/mi-interp.c (mi_interp::init): Update.
1681 * interps.h (interp_name): Remove.
1682 (~scoped_restore_interp): Update.
1683 * tui/tui.c (tui_enable): Update.
1685 2018-05-25 Tom Tromey <tom@tromey.com>
1687 * utils.c (fputs_maybe_filtered): Update.
1688 * linespec.c (decode_line_full): Update.
1689 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1690 (mi_print_breakpoint_for_event, mi_solib_loaded)
1691 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1692 (mi_user_selected_context_changed): Update.
1693 * mi/mi-main.c (mi_execute_command): Update.
1694 * cli/cli-script.c (execute_control_command): Update.
1695 * python/python.c (execute_gdb_command): Update.
1696 * solib.c (info_sharedlibrary_command): Update.
1697 * interps.c (interp_ui_out): Remove.
1698 * interps.h (interp_ui_out): Remove.
1700 2018-05-25 Tom Tromey <tom@tromey.com>
1702 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1703 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1704 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1706 2018-05-25 Tom Tromey <tom@tromey.com>
1708 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1709 * interps.c (interp_exec): Use scoped_restore.
1711 2018-05-25 Tom Tromey <tom@tromey.com>
1713 * remote.c (remote_target::remote_file_get): Use
1715 (remote_target::remote_file_put): Likewise.
1717 2018-05-25 Tom Tromey <tom@tromey.com>
1719 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1721 (get_pe_section_index, add_pe_exported_sym): Update.
1722 (read_pe_exported_syms): Use gdb::def_vector.
1724 2018-05-25 Tom Tromey <tom@tromey.com>
1726 * frame.c (remove_prev_frame): Remove.
1727 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1729 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1731 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1733 * mips-linux-nat.c (supply_fpregset): Always call
1734 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1735 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1736 `mips_fill_fpregset'.
1737 * mips-linux-tdep.c (mips_supply_fpregset)
1738 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1739 (mips_fill_fpregset_wrapper): Remove functions.
1740 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1741 (mips_linux_fpregset): Remove variable.
1742 (mips_linux_iterate_over_regset_sections): Use
1743 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1744 (mips_linux_o32_sigframe_init): Remove comment.
1746 2018-05-25 Pedro Alves <palves@redhat.com>
1748 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1749 (struct readahead_cache, struct packet_reg, struct
1750 remote_arch_state, class remote_state): Move higher up in the
1752 (remote_target::m_remote_state): Now an object instead of a pointer.
1753 (remote_target::get_remote_state): Adjust.
1755 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1757 * stack.c (select_and_print_frame): Delete.
1758 (struct function_bounds): Move struct within function.
1759 (func_command): Most content moved into new function
1760 find_frame_for_function, use new function, print result, add
1762 (find_frame_for_function): New function, now returns a result.
1764 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1766 * stack.c (iterate_over_block_arg_vars): Fix comment.
1767 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1769 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1773 (scoped_restore_selected_frame::scoped_restore_selected_frame):
1775 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1777 * frame.h (class scoped_restore_selected_frame): New class.
1778 * stack.c (print_frame_local_vars): Remove catching and rethrowing
1779 of any exception, use scoped_restore_selected_frame to restore the
1782 2018-05-24 Pedro Alves <palves@redhat.com>
1784 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1787 2018-05-23 Tom Tromey <tom@tromey.com>
1789 * complaints.c (struct complaints): Remove.
1790 (symfile_complaint_book): Remove.
1791 (series): New global.
1792 (complaint_internal): Update.
1793 (clear_complaints): Update.
1795 2018-05-23 Tom Tromey <tom@tromey.com>
1797 * complaints.c (counters): New global.
1798 (struct complain): Remove.
1799 (struct complaints) <root>: Remove.
1800 (complaint_sentinel): Remove.
1801 (symfile_complaint_book): Update.
1802 (find_complaint) Remove.
1803 (complaint_internal, clear_complaints): Update.
1805 2018-05-23 Tom Tromey <tom@tromey.com>
1807 * complaints.c (struct complain) <file, line>: Remove.
1808 (find_complaint): Remove file, line parameters.
1809 (complaint_internal): Update.
1811 2018-05-23 Tom Tromey <tom@tromey.com>
1813 * complaints.c (vcomplaint): Remove.
1814 (complaint_internal) Merge in contents of vcomplaint.
1816 2018-05-23 Tom Tromey <tom@tromey.com>
1818 * complaints.c (struct complaints) <explanation>: Remove.
1819 (symfile_explanations): Remove.
1820 (symfile_complaint_book): Update.
1821 (vcomplaint): Update.
1822 (struct explanation): Remove.
1824 2018-05-23 Tom Tromey <tom@tromey.com>
1826 * complaints.c (symfile_complaints): Remove.
1827 (complaint_internal): Remove "complaints" parameter.
1828 (clear_complaints, vcomplaint): Remove "c" parameter.
1829 (get_complaints): Remove.
1830 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1831 (dwarf2_debug_line_missing_file_complaint)
1832 (dwarf2_debug_line_missing_end_sequence_complaint)
1833 (dwarf2_complex_location_expr_complaint)
1834 (dwarf2_const_value_length_mismatch_complaint)
1835 (dwarf2_section_buffer_overflow_complaint)
1836 (dwarf2_macro_malformed_definition_complaint)
1837 (dwarf2_invalid_attrib_class_complaint)
1838 (create_addrmap_from_index, dw2_symtab_iter_next)
1839 (dw2_expand_marked_cus)
1840 (dw2_debug_names_iterator::find_vec_in_debug_names)
1841 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1842 (create_debug_type_hash_table, init_cutu_and_read_dies)
1843 (partial_die_parent_scope, add_partial_enumeration)
1844 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1845 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1846 (read_import_statement, read_file_scope, create_dwo_cu_reader)
1847 (create_cus_hash_table, create_dwp_hash_table)
1848 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1849 (dwarf2_rnglists_process, dwarf2_ranges_process)
1850 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1851 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1852 (handle_struct_member_die, process_structure_scope)
1853 (read_array_type, read_common_block, read_module_type)
1854 (read_tag_pointer_type, read_typedef, read_base_type)
1855 (read_subrange_type, load_partial_dies, partial_die_info::read)
1856 (partial_die_info::read, partial_die_info::read)
1857 (partial_die_info::read, read_checked_initial_length_and_offset)
1858 (dwarf2_string_attr, read_formatted_entries)
1859 (dwarf_decode_line_header)
1860 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1861 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1862 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1863 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1864 (get_signatured_type, get_DW_AT_signature_type)
1865 (decode_locdesc, file_file_name, consume_improper_spaces)
1866 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1867 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1868 (dwarf2_symbol_mark_computed, set_die_type)
1869 (read_attribute_value): Update.
1870 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1872 * dbxread.c (unknown_symtype_complaint)
1873 (lbrac_mismatch_complaint, repeated_header_complaint)
1874 (set_namestring, function_outside_compilation_unit_complaint)
1875 (read_dbx_symtab, process_one_symbol): Update.
1876 * gdbtypes.c (stub_noname_complaint): Update.
1877 * windows-nat.c (handle_unload_dll): Update.
1878 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1879 (decode_base_type): Update.
1880 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1881 (eb_complaint, record_include_begin, record_include_end)
1882 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1883 (process_xcoff_symbol, read_symbol)
1884 (function_outside_compilation_unit_complaint)
1885 (scan_xcoff_symtab): Update.
1886 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1887 * buildsym.c (finish_block_internal, make_blockvector)
1888 (end_symtab_get_static_block, augment_type_symtab): Update.
1889 * dtrace-probe.c (dtrace_process_dof)
1890 (dtrace_static_probe_ops::get_probes): Update.
1891 * complaints.h (struct complaint): Don't declare.
1892 (symfile_complaints): Remove.
1893 (complaint_internal): Remove "complaints" parameter.
1894 (complaint): Likewise.
1895 (clear_complaints): Likewise.
1896 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1897 (reread_symbols): Update.
1898 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1899 (dwarf2_frame_cache, decode_frame_entry): Update.
1900 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1901 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1902 (info_selectors_command): Update.
1903 * macrotab.c (macro_include, check_for_redefinition)
1904 (macro_undef): Update.
1905 * objfiles.c (filter_overlapping_sections): Update.
1906 * stabsread.c (invalid_cpp_abbrev_complaint)
1907 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1908 (define_symbol, error_type, read_type, rs6000_builtin_type)
1909 (stabs_method_name_from_physname, read_member_functions)
1910 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1911 (attach_fields_to_type, complain_about_struct_wipeout)
1912 (read_range_type, read_args, common_block_start)
1913 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1915 * mdebugread.c (index_complaint, unknown_ext_complaint)
1916 (basic_type_complaint, bad_tag_guess_complaint)
1917 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1918 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1919 (parse_procedure, parse_lines)
1920 (function_outside_compilation_unit_complaint)
1921 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1922 (bad_tag_guess_complaint, reg_value_complaint): Update.
1923 * cp-support.c (demangled_name_complaint): Update.
1924 * macroscope.c (sal_macro_scope): Update.
1925 * dwarf-index-write.c (class debug_names): Update.
1927 2018-05-23 Tom Tromey <tom@tromey.com>
1929 * complaints.c (clear_complaints): Remove "noisy" parameter.
1930 * complaints.h (clear_complaints): Update.
1931 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1932 (reread_symbols): Update.
1934 2018-05-23 Tom Tromey <tom@tromey.com>
1936 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1938 (vcomplaint, clear_complaints): Update.
1939 (symfile_explanations): Remove some messages.
1941 2018-05-23 Tom Tromey <tom@tromey.com>
1943 * complaints.c (internal_complaint): Remove.
1944 * complaints.h (internal_complaint): Remove.
1946 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1948 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1950 2018-05-22 Pedro Alves <palves@redhat.com>
1952 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1953 (remote_fileio_badfd, remote_fileio_return_errno)
1954 (remote_fileio_return_success, remote_fileio_func_open)
1955 (remote_fileio_func_open, remote_fileio_func_close)
1956 (remote_fileio_func_read, remote_fileio_func_write)
1957 (remote_fileio_func_lseek, remote_fileio_func_rename)
1958 (remote_fileio_func_unlink, remote_fileio_func_stat)
1959 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1960 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1961 remote_target parameter.
1962 (remote_fio_func_map) <func>: Add remote_target parameter.
1963 (do_remote_fileio_request, remote_fileio_request):
1964 * remote-fileio.h (remote_fileio_request):
1965 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1966 remote_target parameter.
1967 (remote_notif_process, handle_notification): Adjust to pass down
1969 (remote_notif_state_allocate): Add remote_target parameter. Save
1971 * remote-notif.h (struct remote_target): Forward declare.
1972 (struct notif_client) <parse, ack, can_get_pending_events>: Add
1973 remote_target parameter.
1974 (struct remote_notif_state) <remote>: New field.
1975 (remote_notif_ack, remote_notif_parse): Add remote_target
1977 (remote_notif_state_allocate, remote_notif_state_allocate): Add
1978 remote_target parameter.
1979 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1980 (threads_listing_context, rmt_thread_action, protocol_feature)
1981 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1982 (packet_result, struct threads_listing_context, remote_state):
1983 Move definitions and declarations higher up.
1984 (remote_target) <~remote_target>: Declare.
1985 (remote_download_command_source, remote_file_put, remote_file_get)
1986 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1987 (remote_hostio_pread_vFile, remote_hostio_send_command)
1988 (remote_hostio_set_filesystem, remote_hostio_open)
1989 (remote_hostio_close, remote_hostio_unlink, remote_state)
1990 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1991 (get_memory_write_packet_size, get_memory_read_packet_size)
1992 (append_pending_thread_resumptions, remote_detach_1)
1993 (append_resumption, remote_resume_with_vcont)
1994 (add_current_inferior_and_thread, wait_ns, wait_as)
1995 (process_stop_reply, remote_notice_new_inferior)
1996 (process_initial_stop_replies, remote_add_thread)
1997 (btrace_sync_conf, remote_btrace_maybe_reopen)
1998 (remove_new_fork_children, kill_new_fork_children)
1999 (discard_pending_stop_replies, stop_reply_queue_length)
2000 (check_pending_events_prevent_wildcard_vcont)
2001 (discard_pending_stop_replies_in_queue, stop_reply)
2002 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2003 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2004 (remote_interrupt_as, remote_interrupt_ns)
2005 (remote_get_noisy_reply, remote_query_attached)
2006 (remote_add_inferior, remote_current_thread, get_current_thread)
2007 (set_thread, set_general_thread, set_continue_thread)
2008 (set_general_process, write_ptid)
2009 (remote_unpack_thread_info_response, remote_get_threadinfo)
2010 (parse_threadlist_response, remote_get_threadlist)
2011 (remote_threadlist_iterator, remote_get_threads_with_ql)
2012 (remote_get_threads_with_qxfer)
2013 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2014 (get_offsets, remote_check_symbols, remote_supported_packet)
2015 (remote_query_supported, remote_packet_size)
2016 (remote_serial_quit_handler, remote_detach_pid)
2017 (remote_vcont_probe, remote_resume_with_hc)
2018 (send_interrupt_sequence, interrupt_query)
2019 (remote_notif_get_pending_events, fetch_register_using_p)
2020 (send_g_packet, process_g_packet, fetch_registers_using_g)
2021 (store_register_using_P, store_registers_using_G)
2022 (set_remote_traceframe, check_binary_download)
2023 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2024 (remote_xfer_live_readonly_partial, remote_read_bytes)
2025 (remote_send_printf, remote_flash_write, readchar)
2026 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2027 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2028 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2029 (extended_remote_disable_randomization, extended_remote_run)
2030 (send_environment_packet, extended_remote_environment_support)
2031 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2032 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2033 (packet_command): Now methods of ...
2034 (remote_target): ... this class.
2035 (m_remote_state) <remote_target>: New field.
2036 (struct remote_state) <stop_reply_queue,
2037 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2039 (remote_state::remote_state): Allocate stop_reply_queue.
2040 (remote_state): Delete global.
2041 (get_remote_state_raw): Delete.
2042 (remote_target::get_remote_state): Allocate m_remote_state on
2044 (get_current_remote_target): New.
2045 (remote_ops, extended_remote_ops): Delete.
2046 (wait_forever_enabled_p, remote_async_inferior_event_token):
2047 Delete, moved to struct remote_state.
2048 (remote_target::close): Delete self. Destruction bits split to
2050 (remote_target::~remote_target): ... this.
2051 (show_memory_packet_size): Adjust to use
2052 get_current_remote_target.
2053 (struct protocol_feature) <func>: Add remote_target parameter.
2054 All callers adjusted.
2055 (curr_quit_handler_target): New.
2056 (remote_serial_quit_handler): Reimplement.
2057 (remote_target::open_1): Adjust to use get_current_remote_target.
2058 Heap-allocate remote_target/extended_remote_target instances.
2059 (vcont_builder::vcont_builder): Add remote_target parameter, and
2060 save it in m_remote. All callers adjusted.
2061 (vcont_builder::m_remote): New field.
2062 (vcont_builder::restart, vcont_builder::flush)
2063 (vcont_builder::push_action): Use it.
2064 (remote_target::commit_resume): Use it.
2065 (struct queue_iter_param) <remote>: New field.
2066 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2067 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2068 (check_pending_event_prevents_wildcard_vcont_callback)
2069 (remote_target::check_pending_events_prevent_wildcard_vcont)
2070 (remote_target::discard_pending_stop_replies)
2071 (remote_target::discard_pending_stop_replies_in_queue)
2072 (remote_target::remote_notif_remove_queued_reply): Fill in
2074 (remote_notif_get_pending_events): New.
2075 (remote_target::readchar, remote_target::remote_serial_write):
2076 Save/restore curr_quit_handler_target.
2078 (kill_new_fork_children): Fill in 'remote' field.
2079 (packet_command): Use get_current_remote_target, defer to
2080 remote_target method of same name.
2081 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2082 parameter, and save it in m_remote. All callers adjusted.
2083 (scoped_remote_fd::release): Use m_remote.
2084 (scoped_remote_fd::m_remote): New field.
2085 (remote_file_put, remote_file_get, remote_file_delete): Use
2086 get_current_remote_target, defer to remote_target method of same
2088 (remote_btrace_reset): Add remote_state paremeter. Update all
2090 (remote_async_inferior_event_handler). Pass down 'data'.
2091 (remote_new_objfile): Use get_current_remote_target.
2092 (remote_target::vcont_r_supported): New.
2093 (set_range_stepping): Use get_current_remote_target and
2094 remote_target::vcont_r_supported.
2095 (_initialize_remote): Don't allocate 'remote_state' and
2096 'stop_reply_queue' globals.
2097 * remote.h (struct remote_target): Forward declare.
2098 (getpkt, putpkt, remote_notif_get_pending_events): Add
2099 'remote_target' parameter.
2101 2018-05-22 Pedro Alves <palves@redhat.com>
2103 * remote.c (vcont_builder): Now a class. Make all data members
2105 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2107 (vcont_builder_restart): Rename to ...
2108 (vcont_builder::restart): ... this.
2109 (vcont_builder_flush): Rename to ...
2110 (vcont_builder::flush): ... this.
2111 (vcont_builder_push_action): Rename to ...
2112 (vcont_builder::push_action): ... this.
2113 (remote_target::commit_resume): Adjust.
2115 2018-05-22 Pedro Alves <palves@redhat.com>
2117 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2118 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2119 (get_fixed_memory_packet_size): New.
2120 (get_memory_packet_size): Use it.
2121 (set_memory_packet_size): Don't override the config size with
2122 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2123 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2124 Don't refer to get_memory_packet_size if not connected to a remote
2125 target. Show "(default)" if configured size is 0.
2127 2018-05-22 Pedro Alves <palves@redhat.com>
2129 * remote.c (remote_target::mourn_inferior): Move
2130 discard_pending_stop_replies call here from ...
2131 (_initialize_remote): ... here.
2133 2018-05-22 Pedro Alves <palves@redhat.com>
2135 * remote.c (compare_section_command): Remove set_general_process
2138 2018-05-22 Pedro Alves <palves@redhat.com>
2140 * remote.c (struct packet_reg, struct remote_arch_state):
2141 Move higher up in the file.
2142 (remote_state) <m_arch_states>: Store remote_arch_state values
2143 instead of remote_arch_state pointers.
2144 (remote_state::get_remote_arch_state): Adjust.
2146 2018-05-22 Pedro Alves <palves@redhat.com>
2148 * remote.c: Include <unordered_map>.
2149 (remote_state): Now a class.
2150 (remote_state) <get_remote_arch_state>: Declare method.
2151 <get_remote_arch_state>: New field.
2152 (remote_arch_state) <remote_arch_state>: Declare ctor.
2153 <regs>: Now a unique_ptr.
2154 (remote_gdbarch_data_handle): Delete.
2155 (get_remote_arch_state): Delete.
2156 (remote_state::get_remote_arch_state): New.
2157 (get_remote_state): Adjust to call remote_state's
2158 get_remote_arch_state method.
2159 (init_remote_state): Delete, bits factored out to ...
2160 (remote_arch_state::remote_arch_state): ... this new method.
2161 (get_remote_packet_size, get_memory_packet_size)
2162 (process_g_packet, remote_target::fetch_registers)
2163 (remote_target::prepare_to_store, store_registers_using_G)
2164 (remote_target::store_registers, remote_target::get_trace_status):
2165 Adjust to call remote_state's method.
2166 (_initialize_remote): Remove reference to
2167 remote_gdbarch_data_handle.
2169 2018-05-22 Pedro Alves <palves@redhat.com>
2171 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2172 pread>: New method declarations.
2173 (remote_target::open_1): Adjust.
2174 (readahead_cache_invalidate): Rename to ...
2175 (readahead_cache::invalidate): ... this, and adjust to be a class
2177 (readahead_cache_invalidate_fd): Rename to ...
2178 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2180 (remote_hostio_pwrite): Adjust.
2181 (remote_hostio_pread_from_cache): Rename to ...
2182 (readahead_cache::pread): ... this, and adjust to be a class
2184 (remote_hostio_close): Adjust.
2186 2018-05-22 Pedro Alves <palves@redhat.com>
2188 * remote.c (remote_hostio_close_cleanup): Delete.
2189 (class scoped_remote_fd): New.
2190 (remote_file_put, remote_file_get): Use it.
2192 2018-05-22 Pedro Alves <palves@redhat.com>
2194 (struct vCont_action_support): Use bool and initialize all fields.
2195 (struct readahead_cache): Initialize all fields.
2196 (remote_state): Use bool and initialize all fields.
2197 (remote_state::remote_state, remote_state::~remote_state): New.
2198 (new_remote_state): Delete.
2199 (_initialize_remote): Use new to allocate remote_state.
2201 2018-05-22 Pedro Alves <palves@redhat.com>
2205 * c-exp.y: Include "c-support.h".
2206 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2207 of tolower. Use c_ident_is_alpha to scan names.
2208 * c-lang.c: Include "c-support.h".
2209 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2210 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2211 * c-support.h: New file, with bits factored out from ...
2212 * cp-name-parser.y: ... this file.
2213 Include "c-support.h".
2214 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2215 c-support.h and renamed.
2216 (symbol_end, yylex): Adjust.
2218 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2220 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2221 parameter type to CORE_ADDR.
2222 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2223 parameter type in declaration to CORE_ADDR.
2224 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2225 target_auxv_search to get AT_HWCAP and use the result to get the
2227 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2228 to CORE_ADDR. Remove the cast of the return value to unsigned
2229 long. Fix error predicate of target_auxv_search.
2230 (ppc_linux_nat_target::read_description): Change the type of the
2231 hwcap variable to CORE_ADDR.
2233 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2235 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2236 if the size of fpscr is larger than 32 bits.
2238 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2240 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2241 (ppc32_linux_vsxregmap): New global.
2242 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2243 regcache_supply_regset, and regcache_collect_regset.
2244 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2245 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2246 (fetch_vsx_register, store_vsx_register): Remove.
2247 (fetch_vsx_registers): Add regno parameter. Get regset using
2248 ppc_linux_vsxregset. Use regset to supply registers.
2249 (store_vsx_registers): Add regno parameter. Get regset using
2250 ppc_linux_vsxregset. Use regset to collect registers.
2251 (fetch_register): Call fetch_vsx_registers instead of
2253 (store_register): Call store_vsx_registers instead of
2255 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2256 new regno parameter.
2257 (store_ppc_registers): Call store_vsx_registers with -1 for the
2258 new regno parameter.
2259 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2260 (ppc_collect_vsxregset): Remove.
2262 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2264 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2266 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2267 for vector register offset fields.
2268 (ppc64_fbsd_reg_offsets): Likewise.
2269 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2270 to vector register offset fields.
2271 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2272 to vector register offset fields.
2273 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2274 vector register offset fields.
2275 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2276 initializers for vector register offset fields.
2277 (rs6000_aix64_reg_offsets): Likewise.
2278 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2279 (ppc_supply_vrregset): Remove.
2280 (ppc_collect_vrregset): Remove.
2281 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2282 (ppc_linux_vrregset) : New function.
2283 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2284 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2285 (ppc32_linux_vrregset): Remove.
2286 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2287 and use result instead of ppc32_linux_vrregset.
2288 (ppc32_linux_reg_offsets): Remove initializers for vector register
2290 (ppc64_linux_reg_offsets): Likewise.
2291 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2292 * ppc-linux-nat.c: Include regset.h.
2293 (gdb_vrregset_t): Adjust comment to account for little-endian
2295 (supply_vrregset, fill_vrregset): Remove.
2296 (fetch_altivec_register, store_altivec_register): Remove.
2297 (fetch_altivec_registers): Add regno parameter. Get regset using
2298 ppc_linux_vrregset. Use regset to supply registers.
2299 (store_altivec_registers): Add regno parameter. Get regset using
2300 ppc_linux_vrregset. Use regset to collect registers.
2301 (fetch_register): Call fetch_altivec_registers instead of
2302 fetch_altivec_register.
2303 (store_register): Call store_altivec_registers instead of
2304 store_altivec_register.
2305 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
2306 the new regno parameter.
2307 (store_ppc_registers): Call store_altivec_registers with -1 for
2308 the new regno parameter.
2310 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2312 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
2313 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
2314 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2315 (gdb_vrregset_t): Change array type size to
2316 PPC_LINUX_SIZEOF_VRREGSET.
2317 (gdb_vsxregset_t): Change array type size to
2318 PPC_LINUX_SIZEOF_VSXREGSET.
2319 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
2320 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
2321 PPC_LINUX_SIZEOF_VSXREGSET.
2323 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2325 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
2326 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
2328 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
2329 ppc_linux_target_wordsize with tid.
2330 (ppc_linux_nat_target::read_description): Call ppc_linux_target
2332 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
2333 (ppc64_64bit_inferior_p): Add static and inline specifiers.
2334 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
2335 tid parameter. Remove static specifier.
2336 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
2337 (ppc_linux_target_wordsize): New declaration.
2339 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2341 * arch/ppc-linux-common.c: New file.
2342 * arch/ppc-linux-common.h: New file.
2343 * arch/ppc-linux-tdesc.h: New file.
2344 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
2345 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
2346 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
2347 arch/ppc-linux-tdesc.h.
2348 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
2349 arch/ppc-linux-tdesc.h.
2350 (ppc_linux_nat_target::read_description): Remove target
2351 description matching code. Fill a ppc_linux_features struct and
2352 call ppc_linux_match_description with it. Move comment about ISA
2353 2.05 to ppc-linux-common.c.
2354 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
2355 arch/ppc-linux-tdesc.h.
2356 (ppc_linux_core_read_description): Remove target description
2357 matching code. Fill a ppc_linux_features struct and call
2358 ppc_linux_match_description with it.
2359 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2360 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2361 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2362 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2363 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2364 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2365 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2366 (tdesc_powerpc_e500l): Remove.
2368 2018-05-22 Joel Brobecker <brobecker@adacore.com>
2370 * ada-lang.c (catch_assert_command): Pass empty string instead
2371 of NULL for excep_string argument.
2373 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2375 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
2376 the width of the requested register exceeds the width of the
2379 2018-05-21 Tom Tromey <tom@tromey.com>
2381 * printcmd.c (output_command): Remove.
2382 (output_command_const): Rename to output_command.
2383 * valprint.h (output_command): Rename from output_command_const.
2384 * tracepoint.c (trace_dump_actions): Call output_command.
2386 2018-05-21 Tom Tromey <tom@tromey.com>
2388 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2389 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
2390 * ada-lang.h (create_ada_exception_catchpoint): Update.
2391 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
2393 (create_excep_cond_exprs, ~ada_catchpoint)
2394 (should_stop_exception, print_one_exception)
2395 (print_mention_exception, print_recreate_exception): Update.
2396 (ada_get_next_arg): Remove.
2397 (catch_ada_exception_command_split): Use std::string. Change type
2398 of "excep_string", "cond_string".
2399 (catch_ada_exception_command): Update.
2400 (create_ada_exception_catchpoint): Change type of excep_string.
2401 (ada_exception_sal): Remove excep_string parameter.
2402 (~ada_catchpoint): Remove.
2404 2018-05-21 Tom Tromey <tom@tromey.com>
2406 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
2409 2018-05-21 Tom Tromey <tom@tromey.com>
2411 * ada-lang.c (ada_exception_message_1, ada_exception_message):
2412 Return unique_xmalloc_ptr.
2413 (print_it_exception): Update.
2415 2018-05-21 Tom Tromey <tom@tromey.com>
2417 * tracepoint.c (trace_dump_actions): Use std::string.
2419 2018-05-21 Tom Tromey <tom@tromey.com>
2421 * symfile.c (reread_symbols): Use std::string for original_name.
2423 2018-05-21 Tom Tromey <tom@tromey.com>
2425 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
2426 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
2429 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
2431 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
2433 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
2434 * objfiles.c (get_objfile_bfd_data): Allocate
2435 objfile_per_bfd_storage with obstack_new when allocating on
2438 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2440 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
2442 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
2443 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
2444 * mdebugread.c (mdebug_build_psymtabs): Likewise.
2445 (add_pending): Likewise.
2446 (parse_symbol): Likewise.
2447 (parse_partial_symbols): Likewise.
2448 (psymtab_to_symtab_1): Likewise.
2449 (new_psymtab): Likewise.
2450 (elfmdebug_build_psymtabs): Likewise.
2451 * minsyms.c (terminate_minimal_symbol_table): Likewise.
2452 * objfiles.c (get_objfile_bfd_data): Likewise.
2453 (objfile_register_static_link): Likewise.
2454 * psymtab.c (allocate_psymtab): Likewise.
2455 * stabsread.c (read_member_functions): Likewise.
2456 * xcoffread.c (xcoff_end_psymtab): Likewise.
2458 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
2460 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
2461 compiler supports std::is_trivially_constructible.
2462 * common/poison.h: Include obstack.h.
2463 (IsMallocable): Define to is_trivially_constructible if the
2464 compiler supports it, define to true_type otherwise.
2468 (XOBNEWVEC): Redefine.
2469 * gdb_obstack.h (obstack_zalloc): New.
2470 (OBSTACK_ZALLOC): Redefine.
2471 (obstack_calloc): New.
2472 (OBSTACK_CALLOC): Redefine.
2474 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
2475 (gdbarch_obstack): New declaration in gdbarch.h, definition in
2477 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
2478 obstack_calloc/obstack_zalloc.
2479 (gdbarch_obstack_zalloc): Remove.
2480 * target-descriptions.c (tdesc_data_init): Use obstack_new.
2482 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2484 * stack.c (backtrace_command_1): Remove useless variable int i.
2486 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2488 * stack.c (print_frame_info): Fix comment.
2490 2018-05-18 Tom Tromey <tom@tromey.com>
2492 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
2493 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
2494 (~dwarf2_per_objfile): Update
2495 (dwarf2_get_dwz_file): Use new.
2496 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
2499 2018-05-18 Tom Tromey <tom@tromey.com>
2501 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
2503 * dwarf2read.c (struct dwp_file): Add constructor and
2505 (open_and_init_dwp_file): Return a unique_ptr.
2506 (dwarf2_per_objfile, create_dwp_hash_table)
2507 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
2508 (lookup_dwo_unit_in_dwp): Update.
2509 (open_and_init_dwp_file, get_dwp_file): Update.
2511 2018-05-18 Tom Tromey <tom@tromey.com>
2513 * dwarf2read.c (dwarf2_per_objfile): Update.
2514 (struct mapped_index): Add initializers.
2515 (dwarf2_read_index): Use new.
2516 (dw2_symtab_iter_init): Update.
2517 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
2520 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2522 * dwarf2read.c (mapped_index) <total_size>: Remove.
2524 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
2526 * unittests/format_pieces-selftests.c (test_format_specifier):
2529 2018-05-18 Tom Tromey <tom@tromey.com>
2531 * c-typeprint.c (maybe_print_hole): New function.
2532 (c_print_type_struct_field_offset): Update.
2533 (c_type_print_base_struct_union): Call maybe_print_hole.
2535 2018-05-17 Keith Seitz <keiths@redhat.com>
2537 * breakpoint.c (build_bpstat_chain): New function, moved from
2539 (bpstat_stop_status): Add optional parameter, `stop_chain'.
2540 If no stop chain is passed, call build_bpstat_chain to build it.
2541 * breakpoint.h (build_bpstat_chain): Declare.
2542 (bpstat_stop_status): Move documentation here from breakpoint.c.
2543 * infrun.c (handle_signal_stop): Before eliding inlined frames,
2544 build the stop chain and pass it to skip_inline_frames.
2545 Pass this stop chain to bpstat_stop_status.
2546 * inline-frame.c: Include breakpoint.h.
2547 (stopped_by_user_bp_inline_frame): New function.
2548 (skip_inline_frames): Add parameter `stop_chain'.
2549 Move documention to inline-frame.h.
2550 If non-NULL, use stopped_by_user_bp_inline_frame to determine
2551 whether the frame should be elided.
2552 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
2553 Add moved documentation and update for new parameter.
2555 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2558 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2559 unittests/format_pieces-selftests.c.
2560 * common/format.h (format_piece) <operator==>: New.
2561 (format_pieces) <operator[]>: Remove.
2562 * common/format.c (format_pieces::format_pieces): Handle \e.
2563 * unittests/format_pieces-selftests.c: New.
2565 2018-05-17 Tom Tromey <tom@tromey.com>
2568 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
2569 (dw2_instantiate_symtab): Add skip_partial parameter.
2570 (dw2_find_last_source_symtab, dw2_map_expand_apply)
2571 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
2572 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
2573 (dw2_expand_symtabs_matching_one)
2574 (dw2_find_pc_sect_compunit_symtab)
2575 (dw2_debug_names_lookup_symbol)
2576 (dw2_debug_names_expand_symtabs_for_function): Update.
2577 (init_cutu_and_read_dies): Add skip_partial parameter.
2578 (process_psymtab_comp_unit, build_type_psymtabs_1)
2579 (process_skeletonless_type_unit, load_partial_comp_unit)
2580 (psymtab_to_symtab_1): Update.
2581 (load_full_comp_unit): Add skip_partial parameter.
2582 (process_imported_unit_die, dwarf2_read_addr_index)
2583 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
2584 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
2585 (read_signatured_type): Update.
2587 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
2589 * value.c (release_value): Remove unused variable.
2590 (record_latest_value): Likewise.
2591 (access_value_history): Likewise.
2592 (preserve_values): Likewise.
2594 2018-05-17 Tom Tromey <tom@tromey.com>
2596 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
2599 2018-05-16 Maciej W. Rozycki <macro@mips.com>
2602 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
2603 Also handle registers whose width is not a multiple of
2605 (linux_nat_trad_target::store_register): Likewise.
2607 2018-05-16 Tom Tromey <tom@tromey.com>
2609 * gdbcore.h (core_bfd): Redefine.
2610 * corelow.c (core_target::close): Update.
2611 (core_target_open): Update.
2612 * progspace.h (struct program_space) <cbfd>: Now a
2615 2018-05-16 Tom Tromey <tom@tromey.com>
2618 * symfile-add-flags.h (enum symfile_add_flags)
2619 <SYMFILE_NOT_FILENAME>: New constant.
2620 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
2621 objfile name from BFD.
2622 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
2623 * minidebug.c (find_separate_debug_file_in_section): Put
2624 ".gnu_debugdata" into BFD's file name.
2626 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2628 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2631 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2634 * aarch64-tdep.c (aarch64_analyze_prologue,
2635 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2636 Indicate not interested in errors.
2638 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2640 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2641 Supply the MIPS_ZERO_REGNUM register.
2643 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2645 * mips-tdep.c (mask_address_var): Make variable static.
2647 2018-05-14 Tom Tromey <tom@tromey.com>
2649 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2651 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2653 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2654 FXSAVE_ADDR for the mxcsr register.
2656 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
2658 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2660 2018-05-11 Pedro Alves <palves@redhat.com>
2662 * corelow.c (core_target) <core_target>: No longer inline.
2663 Initialize m_core_gdbarch, m_core_vec and build the section table
2665 <~core_target>: New.
2666 <core_gdbarch, get_core_register_section>: New methods.
2667 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2668 factored out from ...
2669 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2671 (sniff_core_bfd): Add gdbarch parameter.
2672 (core_close): Delete, merged into ...
2673 (core_target::close): ... here. Delete self.
2674 (core_close_cleanup): Delete.
2675 (core_target_open): Allocate a core_target on the heap. Use a
2676 unique_ptr instead of a cleanup. Bits moved into the core_target
2677 ctor. Adjust to use core_target methods instead of globals.
2678 (get_core_register_section): Rename to ...
2679 (core_target::get_core_register_section): ... this and adjust.
2680 (struct get_core_registers_cb_data): New.
2681 (get_core_registers_cb): Use it. Use bool.
2682 (core_target::fetch_registers, core_target::files_info)
2683 (core_target::xfer_partial, core_target::read_description)
2684 (core_target::pid_to, core_target::thread_name): Adjust to
2685 reference class fields instead of globals.
2686 * target.h (struct target_ops_deleter, target_ops_up): New.
2688 2018-05-11 Pedro Alves <palves@redhat.com>
2690 * corefile.c (core_file_command): Move to corelow.c.
2691 * corelow.c (the_core_target): Delete.
2692 (core_file_command): Moved from corefile.c. Check exec_bfd
2693 instead of the_core_target. Use target_detach instead of calling
2694 into the_core_target directly.
2695 (maybe_say_no_core_file_now): New.
2696 (core_target::detach): Use it.
2697 (_initialize_corelow): Remove references to the_core_target.
2698 * gdbcore.h (the_core_target): Delete.
2700 2018-05-11 Tom Tromey <tromey@redhat.com>
2701 Pedro Alves <palves@redhat.com>
2703 * corefile.c (core_bfd): Remove.
2704 * gdbcore.h (core_bfd): Now a macro.
2705 * progspace.h (struct program_space) <cbfd>: New field.
2707 2018-05-11 Tom Tromey <tom@tromey.com>
2709 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2712 2018-05-10 Tom Tromey <tom@tromey.com>
2714 * configure: Rebuild.
2715 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2717 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2720 * regformats/regdat.sh: Adjust script, following the addition
2721 of the new expedite_regs parameter to init_target_desc.
2723 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
2726 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2727 set_gdbarch_significant_addr_bit.
2728 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2729 set_gdbarch_significant_addr_bit.
2730 * utils.c (address_significant): Update to sign extend addr.
2732 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
2734 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2735 (xtensa_linux_init_abi): Limit tdep->num_regs by
2736 tdep->num_nopriv_regs.
2737 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2738 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2741 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
2743 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2745 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2747 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2748 (I387_MXCSR_INIT_VAL): New constant.
2749 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2750 buffer if it was supplied by the inferior.
2751 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2752 (i387_xsave_get_clear_bv): New function.
2753 (i387_supply_xsave): Only read x87 control registers from the
2754 xsave buffer if the feature is enabled, and the state will have
2755 been written, otherwise, provide a suitable default.
2756 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2757 including x87 control registers. Update control registers if they
2758 have changed from the default value, and mark features as enabled
2760 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2762 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2764 * spu-tdep.c (info_spu_event_command): Fix output formatting.
2766 2018-05-07 Tom Tromey <tom@tromey.com>
2768 * configure: Rebuild.
2769 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2771 2018-05-07 Tom Tromey <tom@tromey.com>
2774 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2775 bit. Use correct value for VDIV.
2777 2018-05-04 Tom Tromey <tom@tromey.com>
2779 * configure: Rebuild.
2780 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2782 2018-05-04 Tom Tromey <tom@tromey.com>
2784 * linux-record.c (record_linux_system_call) <case
2785 RECORD_SYS_RECVFROM>: Add "break".
2787 2018-05-04 Tom Tromey <tom@tromey.com>
2789 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2790 Add missing "break".
2791 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2792 Add missing "break".
2794 2018-05-04 Tom Tromey <tom@tromey.com>
2796 * rs6000-tdep.c (ppc_process_record_op4)
2797 (ppc_process_record_op63): Add fall-through comment.
2799 2018-05-04 Tom Tromey <tom@tromey.com>
2801 * i386-tdep.c (i386_process_record): Add fall-through comment.
2803 2018-05-04 Tom Tromey <tom@tromey.com>
2805 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2808 2018-05-04 Tom Tromey <tom@tromey.com>
2810 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2811 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2812 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2814 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2816 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2819 2018-05-04 Tom Tromey <tom@tromey.com>
2821 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2823 2018-05-04 Tom Tromey <tom@tromey.com>
2825 * s390-tdep.c (s390_process_record): Fix fall-through comments.
2826 * xcoffread.c (scan_xcoff_symtab): Move comment later.
2827 * symfile.c (section_is_mapped): Fix fall-through comment.
2828 * stabsread.c (define_symbol, read_member_functions): Fix
2829 fall-through comment.
2830 * s390-linux-tdep.c (s390_process_record): Fix fall-through
2832 * remote.c (remote_wait_as): Fix fall-through comment.
2833 * p-exp.y (yylex): Fix fall-through comment.
2834 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2836 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2837 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2838 * jv-exp.y (yylex): Fix fall-through comment.
2839 * go-exp.y (lex_one_token): Fix fall-through comment.
2840 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2841 fall-through comment.
2842 * f-exp.y (yylex): Fix fall-through comment.
2843 * dwarf2read.c (process_die): Fix fall-through comments.
2844 * dbxread.c (process_one_symbol): Fix fall-through comment.
2845 * d-exp.y (lex_one_token): Fix fall-through comment.
2846 * cp-name-parser.y (yylex): Fix fall-through comment.
2847 * coffread.c (coff_symtab_read): Fix fall-through comment.
2848 * c-exp.y (lex_one_token): Fix fall-through comment.
2849 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2851 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2854 2018-05-04 Tom Tromey <tom@tromey.com>
2857 * NEWS: Mention gdb.execute change.
2858 * gdbcmd.h (execute_control_command): Don't declare.
2859 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2860 execute_control_commands, execute_control_commands_to_string.
2861 * cli/cli-script.h (execute_control_commands)
2862 (execute_control_commands_to_string): Declare.
2863 (execute_control_command): Add from_tty parameter.
2864 * cli/cli-script.c (execute_control_commands)
2865 (execute_control_commands_to_string): New functions.
2866 (execute_user_command): Use execute_control_commands.
2867 (execute_control_command_1): Add "from_tty" parameter. Update.
2868 (execute_control_command): Likewise.
2870 2018-05-04 Tom Tromey <tom@tromey.com>
2873 * NEWS: Mention that breakpoint commands are writable.
2874 * python/py-breakpoint.c (bppy_set_commands): New function.
2875 (breakpoint_object_getset) <"commands">: Use it.
2877 2018-05-04 Tom Tromey <tom@tromey.com>
2879 * tracepoint.c (actions_command): Update.
2880 * mi/mi-cmd-break.c (mi_command_line_array)
2881 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2882 (mi_read_next_line): Remove.
2883 (mi_cmd_break_commands): Update.
2884 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2886 * cli/cli-script.c (get_command_line): Update.
2887 (process_next_line): Use function_view. Constify.
2888 (recurse_read_control_structure, read_command_lines)
2889 (read_command_lines_1): Change argument types to function_view.
2890 (do_define_command, document_command): Update.
2891 * breakpoint.h (check_tracepoint_command): Don't declare.
2892 * breakpoint.c (check_tracepoint_command): Remove.
2893 (commands_command_1, create_tracepoint_from_upload): Update.
2895 2018-05-04 Tom Tromey <tom@tromey.com>
2898 * cli/cli-script.h (enum command_control_type) <define_control>:
2900 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2901 (build_command_line, execute_control_command_1)
2902 (process_next_line): Likewise.
2903 (do_define_command): New function, extracted from define_command.
2904 (define_command): Use it.
2906 2018-05-04 Tom Tromey <tom@tromey.com>
2908 * tracepoint.c (actions_command): Update.
2909 * cli/cli-script.h (read_command_lines): Update.
2910 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2911 (MAX_TMPBUF): Remove define.
2912 (define_command): Use string_printf.
2913 (document_command): Likewise.
2914 * breakpoint.c (commands_command_1): Update.
2916 2018-05-04 Tom Tromey <tom@tromey.com>
2918 * top.c (execute_command): Update.
2919 * cli/cli-script.h (print_command_lines): Now varargs.
2920 * cli/cli-script.c (print_command_lines): Now varargs.
2921 (execute_control_command_1) <case while_control, case if_control>:
2924 2018-05-04 Tom Tromey <tom@tromey.com>
2926 * tracepoint.c (all_tracepoint_actions): Rename from
2927 all_tracepoint_actions_and_cleanup. Change return type.
2928 (actions_command, encode_actions_1, encode_actions)
2929 (trace_dump_actions, tdump_command): Update.
2930 * remote.c (remote_download_command_source): Update.
2931 * python/python.c (gdbpy_eval_from_control_command)
2932 (python_command, python_interactive_command): Update.
2933 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2934 * guile/guile.c (guile_command)
2935 (gdbscm_eval_from_control_command, guile_command): Update.
2936 * compile/compile.c (compile_code_command)
2937 (compile_print_command, compile_to_object): Update.
2938 * cli/cli-script.h (struct command_lines_deleter): New.
2939 (counted_command_line): New typedef.
2940 (struct command_line): Add constructor, destructor.
2941 <body_list>: Remove.
2942 <body_list_0, body_list_1>: New members.
2943 (command_line_up): Remove typedef.
2944 (read_command_lines, read_command_lines_1, get_command_line):
2946 (copy_command_lines): Don't declare.
2947 * cli/cli-script.c (build_command_line): Use "new".
2948 (get_command_line): Return counted_command_line.
2949 (print_command_lines, execute_user_command)
2950 (execute_control_command_1, while_command, if_command): Update.
2951 (realloc_body_list): Remove.
2952 (process_next_line, recurse_read_control_structure): Update.
2953 (read_command_lines, read_command_lines_1): Return counted_command_line.
2954 (free_command_lines): Use "delete".
2955 (copy_command_lines): Remove.
2956 (define_command, document_command, show_user_1): Update.
2957 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2958 a counted_command_line.
2959 * breakpoint.h (counted_command_line): Remove typedef.
2960 (breakpoint_set_commands): Update.
2961 * breakpoint.c (check_no_tracepoint_commands)
2962 (validate_commands_for_breakpoint): Update.
2963 (breakpoint_set_commands): Change commands to be a
2964 counted_command_line.
2965 (commands_command_1, update_dprintf_command_list)
2966 (create_tracepoint_from_upload): Update.
2968 2018-05-04 Tom Tromey <tom@tromey.com>
2970 * cli/cli-decode.h (cmd_list_element): New constructor.
2971 (~cmd_list_element): New destructor.
2972 (struct cmd_list_element): Add initializers.
2973 * cli/cli-decode.c (do_add_cmd): Use "new".
2974 (delete_cmd): Use "delete".
2976 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2977 Pedro Alves <palves@redhat.com>
2979 PR breakpoints/19806 and support for PR external/20207.
2980 * NEWS: Mention Aarch64 watchpoint improvements.
2981 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2982 watchpoints and PR external/20207 watchpoints.
2983 * nat/aarch64-linux-hw-point.c
2984 (kernel_supports_any_contiguous_range): New.
2985 (aarch64_watchpoint_offset): New.
2986 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2987 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2988 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2989 (aarch64_align_watchpoint): New parameters aligned_offset_p and
2990 next_addr_orig_p. Support PR external/20207 watchpoints.
2991 (aarch64_downgrade_regs): New.
2992 (aarch64_dr_state_insert_one_point): New parameters offset and
2994 (aarch64_dr_state_remove_one_point): Likewise.
2995 (aarch64_handle_breakpoint): Update caller.
2996 (aarch64_handle_aligned_watchpoint): Likewise.
2997 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2999 (aarch64_linux_set_debug_regs): Remove const from state. Call
3000 aarch64_downgrade_regs.
3001 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3002 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3003 (DR_CONTROL_MASK): ... this.
3004 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3005 (unsigned int aarch64_watchpoint_offset): New prototype.
3006 (aarch64_linux_set_debug_regs): Remove const from state.
3007 * utils.c (align_up, align_down): Move to ...
3008 * common/common-utils.c (align_up, align_down): ... here.
3009 * utils.h (align_up, align_down): Move to ...
3010 * common/common-utils.h (align_up, align_down): ... here.
3012 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3014 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3015 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3016 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3017 Re-implement to match the ABI as summarized in GCC's
3018 gcc/config/sparc/sparc.c. All callers updated.
3019 (sparc32_store_arguments): Remove assertion.
3021 2018-05-04 Tom Tromey <tom@tromey.com>
3023 * printcmd.c: Don't include tui.h.
3024 (decode_format): Use skip_spaces.
3026 2018-05-04 Tom Tromey <tom@tromey.com>
3029 * printcmd.c (last_count): New global.
3030 (x_command): Use saved count when repeating.
3032 2018-05-04 Tom Tromey <tom@tromey.com>
3034 * nto-procfs.c (do_closedir_cleanup): Remove.
3035 (procfs_pidlist): Use gdb_dir_up.
3036 * procfs.c (do_closedir_cleanup): Remove.
3037 (proc_update_threads): Use gdb_dir_up.
3038 * common/filestuff.h (struct gdb_dir_deleter): New.
3039 (gdb_dir_up): New typedef.
3041 2018-05-04 Tom Tromey <tom@tromey.com>
3043 * ada-lang.c (print_mention_exception): Use std::string.
3045 2018-05-04 Tom Tromey <tom@tromey.com>
3047 * ada-lang.c (create_excep_cond_exprs): Update.
3048 (ada_exception_catchpoint_cond_string): Use std::string.
3050 2018-05-04 Tom Tromey <tom@tromey.com>
3052 * ada-lang.c (xget_renaming_scope): Return std::string.
3053 (old_renaming_is_invisible): Update.
3055 2018-05-04 Tom Tromey <tom@tromey.com>
3057 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3058 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3060 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3062 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3064 2018-05-04 Tom Tromey <tom@tromey.com>
3066 * remote.c (remote_query_supported_append): Change type.
3067 (remote_check_symbols): Update.
3069 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3072 * configure.ac: Prepend libpython.
3073 * python/python-config.py: Likewise.
3074 * configure: Regenerate.
3076 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3078 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3080 2018-05-03 Pedro Alves <palves@redhat.com>
3083 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3084 override. Write 'true' instead of '1'.
3085 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3088 2018-05-02 Pedro Alves <palves@redhat.com>
3090 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3091 add_inf_child_target.
3092 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3093 add_inf_child_target.
3094 * aix-thread.c (aix_thread_target_info): New.
3095 (aix_thread_target) <shortname, longname, doc>: Delete.
3097 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3098 add_inf_child_target.
3099 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3100 add_inf_child_target.
3101 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3102 add_inf_child_target.
3103 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3104 add_inf_child_target.
3105 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3106 add_inf_child_target.
3107 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3108 add_inf_child_target.
3109 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3110 add_inf_child_target.
3111 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3112 add_inf_child_target.
3113 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3114 add_inf_child_target.
3115 * bfd-target.c (target_bfd_target_info): New.
3116 (target_bfd) <shortname, longname, doc>: Delete.
3118 * bsd-kvm.c (bsd_kvm_target_info): New.
3119 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3121 (bsd_kvm_target::open): Rename to ...
3122 (bsd_kvm_target_open): ... this. Adjust.
3123 * bsd-uthread.c (bsd_uthread_target_info): New.
3124 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3126 * corefile.c (core_file_command): Adjust.
3127 * corelow.c (core_target_info): New.
3128 (core_target) <shortname, longname, doc>: Delete.
3130 (core_target::open): Rename to ...
3131 (core_target_open): ... this. Adjust.
3132 * ctf.c (ctf_target_info): New.
3133 (ctf_target) <shortname, longname, doc>: Delete.
3135 (ctf_target::open): Rename to ...
3136 (ctf_target_open): ... this.
3137 (_initialize_ctf): Adjust.
3138 * exec.c (exec_target_info): New.
3139 (exec_target) <shortname, longname, doc>: Delete.
3141 (exec_target::open): Rename to ...
3142 (exec_target_open): ... this.
3143 * gdbcore.h (core_target_open): Declare.
3144 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3145 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3146 add_inf_child_target.
3147 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3148 add_inf_child_target.
3149 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3150 add_inf_child_target.
3151 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3152 add_inf_child_target.
3153 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3154 add_inf_child_target.
3155 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3156 add_inf_child_target.
3157 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3158 add_inf_child_target.
3159 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3160 add_inf_child_target.
3161 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3162 add_inf_child_target.
3163 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3164 add_inf_child_target.
3165 * inf-child.c (inf_child_target_info): New.
3166 (inf_child_target::info): New.
3167 (inf_child_open_target): Remove 'target' parameter. Use
3168 get_native_target instead.
3169 (inf_child_target::open): Delete.
3170 (add_inf_child_target): New.
3171 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3174 (add_inf_child_target): Declare.
3175 (inf_child_open_target): Declare.
3176 * linux-thread-db.c (thread_db_target_info): New.
3177 (thread_db_target) <shortname, longname, doc>: Delete.
3179 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3180 add_inf_child_target.
3181 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3182 add_inf_child_target.
3183 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3184 add_inf_child_target.
3185 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3186 add_inf_child_target.
3187 * make-target-delegates (print_class): Adjust.
3188 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3189 add_inf_child_target.
3190 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3191 add_inf_child_target.
3192 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3193 add_inf_child_target.
3194 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3195 add_inf_child_target.
3196 * nto-procfs.c (nto_native_target_info): New.
3197 (nto_procfs_target_native) <shortname, longname, doc>:
3200 (nto_procfs_target_info): New.
3201 (nto_procfs_target_procfs) <shortname, longname, doc>:
3204 (init_procfs_targets): Adjust.
3205 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3206 add_inf_child_target.
3207 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3208 add_inf_child_target.
3209 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3210 add_inf_child_target.
3211 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3212 add_inf_child_target.
3213 * ravenscar-thread.c (ravenscar_target_info): New.
3214 (ravenscar_thread_target) <shortname, longname, doc>:
3217 * record-btrace.c (record_btrace_target_info):
3218 (record_btrace_target) <shortname, longname, doc>: Delete.
3220 (record_btrace_target::open): Rename to ...
3221 (record_btrace_target_open): ... this. Adjust.
3222 * record-full.c (record_longname, record_doc): New.
3223 (record_full_base_target) <shortname, longname, doc>: Delete.
3225 (record_full_target_info): New.
3226 (record_full_target): <shortname>: Delete.
3228 (record_full_core_open_1, record_full_open_1): Update comments.
3229 (record_full_base_target::open): Rename to ...
3230 (record_full_open): ... this.
3231 (cmd_record_full_restore): Update.
3232 (_initialize_record_full): Update.
3233 * remote-sim.c (remote_sim_target_info): New.
3234 (gdbsim_target) <shortname, longname, doc>: Delete.
3236 (gdbsim_target::open): Rename to ...
3237 (gdbsim_target_open): ... this.
3238 (_initialize_remote_sim): Adjust.
3239 * remote.c (remote_doc): New.
3240 (remote_target_info): New.
3241 (remote_target) <shortname, longname, doc>: Delete.
3243 (extended_remote_target_info): New.
3244 (extended_remote_target) <shortname, longname, doc>: Delete.
3246 (remote_target::open_1): Make static. Adjust.
3247 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3248 * s390-linux-nat.c (_initialize_s390_nat): Use
3249 add_inf_child_target.
3250 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3251 add_inf_child_target.
3252 * sol-thread.c (thread_db_target_info): New.
3253 (sol_thread_target) <shortname, longname, doc>: Delete.
3255 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3256 add_inf_child_target.
3257 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3258 add_inf_child_target.
3259 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3260 add_inf_child_target.
3261 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3262 add_inf_child_target.
3263 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3264 add_inf_child_target.
3265 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3266 add_inf_child_target.
3267 * spu-linux-nat.c (_initialize_spu_nat): Use
3268 add_inf_child_target.
3269 * spu-multiarch.c (spu_multiarch_target_info): New.
3270 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3272 * target-delegates.c: Regenerate.
3273 * target.c: Include <unordered_map>.
3274 (target_ops_p): Delete.
3275 (DEF_VEC_P(target_ops_p)): Delete.
3276 (target_factories): New.
3277 (test_target_info): New.
3278 (test_target_ops::info): New.
3279 (open_target): Adjust to use target_factories.
3280 (add_target_with_completer): Rename to ...
3281 (add_target): ... this. Change prototype. Register target_info
3282 and open callback in target_factories. Register target_info in
3283 command context instead of target_ops.
3284 (add_target): Delete old implementation.
3285 (add_deprecated_target_alias): Change prototype. Adjust.
3286 (the_native_target): New.
3287 (set_native_target, get_native_target): New.
3288 (find_default_run_target): Use the_native_target.
3289 (find_attach_target, find_run_target): Simplify.
3290 (target_ops::open): Delete.
3291 (dummy_target_info): New.
3292 (dummy_target::shortname, dummy_target::longname)
3293 (dummy_target::doc): Delete.
3294 (dummy_target::info): New.
3295 (debug_target::shortname, debug_target::longname)
3296 (debug_target::doc): Delete.
3297 (debug_target::info): New.
3298 * target.h (struct target_info): New.
3299 (target_ops::~target_ops): Add comment.
3300 (target_ops::info): New.
3301 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3302 longer virtual. Implement in terms of target_info.
3303 (set_native_target, get_native_target): Declare.
3304 (target_open_ftype): New.
3305 (add_target, add_target_with_completer)
3306 (add_deprecated_target_alias): Change prototype.
3307 (test_target) <shortname, longname, doc>: Delete.
3309 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
3310 add_inf_child_target.
3311 * tracefile-tfile.c (tfile_target_info): New.
3312 (tfile_target) <shortname, longname, doc>: Delete.
3314 (tfile_target::open): Rename to ...
3315 (tfile_target_open): ... this.
3316 (_initialize_tracefile_tfile): Adjust.
3317 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
3318 add_inf_child_target.
3319 * windows-nat.c (_initialize_windows_nat): Use
3320 add_inf_child_target.
3321 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
3322 add_inf_child_target.
3324 2018-05-02 Pedro Alves <palves@redhat.com>
3326 * linux-nat.h (linux_nat_target) <low_new_thread,
3327 low_delete_thread, low_new_fork, low_forget_process,
3328 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
3329 New virtual methods.
3330 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3331 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
3332 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
3333 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3334 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
3336 * linux-fork.c (delete_fork): Adjust to call low method.
3337 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
3338 (linux_nat_new_fork, linux_nat_forget_process_hook)
3339 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
3340 (linux_nat_status_is_event):
3341 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
3342 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
3344 (sigtrap_is_event): Rename to ...
3345 (linux_nat_target::low_status_is_event): ... this.
3346 (linux_nat_set_status_is_event): Delete.
3347 (save_stop_reason, linux_nat_wait_1)
3348 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
3350 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
3351 (linux_nat_set_new_fork, linux_nat_set_forget_process)
3352 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
3353 (linux_nat_set_prepare_to_resume): Delete.
3354 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
3355 low virtual methods.
3356 * amd64-linux-nat.c: Likewise.
3357 * arm-linux-nat.c: Likewise.
3358 * i386-linux-nat.c: Likewise.
3359 * ia64-linux-nat.c: Likewise.
3360 * mips-linux-nat.c: Likewise.
3361 * ppc-linux-nat.c: Likewise.
3362 * s390-linux-nat.c: Likewise.
3363 * sparc64-linux-nat.c: Likewise.
3364 * x86-linux-nat.c: Likewise.
3365 * x86-linux-nat.h: Include "nat/x86-linux.h".
3366 (x86_linux_nat_target) <low_new_fork, low_forget_process,
3367 low_prepare_to_resume, low_new_thread, low_delete_thread>:
3370 2018-05-02 Pedro Alves <palves@redhat.com>
3372 * target.h (target_ops)
3373 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3374 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
3375 stopped_by_watchpoint, have_continuable_watchpoint,
3376 stopped_data_address, watchpoint_addr_within_range,
3377 can_accel_watchpoint_condition, can_run, thread_alive,
3378 has_all_memory, has_memory, has_stack, has_registers,
3379 has_execution, can_async_p, is_async_p, supports_non_stop,
3380 always_non_stop_p, can_execute_reverse, supports_multi_process,
3381 supports_enable_disable_tracepoint,
3382 supports_disable_randomization, supports_string_tracing,
3383 supports_evaluation_of_breakpoint_conditions,
3384 can_run_breakpoint_commands, filesystem_is_local,
3385 can_download_tracepoint, get_trace_state_variable_value,
3386 set_trace_notes, get_tib_address, use_agent, can_use_agent,
3387 record_is_replaying, record_will_replay,
3388 augmented_libraries_svr4_read>: Adjust to return bool.
3389 * aarch64-linux-nat.c: All implementations adjusted.
3390 * aix-thread.c: All implementations adjusted.
3391 * arm-linux-nat.c: All implementations adjusted.
3392 * breakpoint.c: All implementations adjusted.
3393 * bsd-kvm.c: All implementations adjusted.
3394 * bsd-uthread.c: All implementations adjusted.
3395 * corelow.c: All implementations adjusted.
3396 * ctf.c: All implementations adjusted.
3397 * darwin-nat.c: All implementations adjusted.
3398 * darwin-nat.h: All implementations adjusted.
3399 * exec.c: All implementations adjusted.
3400 * fbsd-nat.c: All implementations adjusted.
3401 * fbsd-nat.h: All implementations adjusted.
3402 * gnu-nat.c: All implementations adjusted.
3403 * gnu-nat.h: All implementations adjusted.
3404 * go32-nat.c: All implementations adjusted.
3405 * ia64-linux-nat.c: All implementations adjusted.
3406 * inf-child.c: All implementations adjusted.
3407 * inf-child.h: All implementations adjusted.
3408 * inf-ptrace.c: All implementations adjusted.
3409 * inf-ptrace.h: All implementations adjusted.
3410 * linux-nat.c: All implementations adjusted.
3411 * linux-nat.h: All implementations adjusted.
3412 * mips-linux-nat.c: All implementations adjusted.
3413 * nto-procfs.c: All implementations adjusted.
3414 * ppc-linux-nat.c: All implementations adjusted.
3415 * procfs.c: All implementations adjusted.
3416 * ravenscar-thread.c: All implementations adjusted.
3417 * record-btrace.c: All implementations adjusted.
3418 * record-full.c: All implementations adjusted.
3419 * remote-sim.c: All implementations adjusted.
3420 * remote.c: All implementations adjusted.
3421 * s390-linux-nat.c: All implementations adjusted.
3422 * sol-thread.c: All implementations adjusted.
3423 * spu-multiarch.c: All implementations adjusted.
3424 * target-delegates.c: All implementations adjusted.
3425 * target.c: All implementations adjusted.
3426 * target.h: All implementations adjusted.
3427 * tracefile-tfile.c: All implementations adjusted.
3428 * tracefile.c: All implementations adjusted.
3429 * tracefile.h: All implementations adjusted.
3430 * windows-nat.c: All implementations adjusted.
3431 * x86-linux-nat.h: All implementations adjusted.
3432 * x86-nat.h: All implementations adjusted.
3434 2018-05-02 Pedro Alves <palves@redhat.com>
3436 * make-target-delegates (scan_target_h): Don't trim lines here.
3437 Replace sequences of tabs and/or whitespace with a single
3439 (top level, parsing methods): Trim each line before processing it
3442 2018-05-02 Pedro Alves <palves@redhat.com>
3443 John Baldwin <jhb@freebsd.org>
3445 * target.h (enum strata) <debug_stratum>: New.
3446 (struct target_ops) <all delegation methods>: Replace by C++
3447 virtual methods, and drop "to_" prefix. All references updated
3449 <to_shortname, to_longname, to_doc, to_data,
3450 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
3451 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
3452 virtual methods. All references updated throughout.
3453 <can_attach, supports_terminal_ours, can_create_inferior,
3454 get_thread_control_capabilities, attach_no_wait>: New
3456 <insert_breakpoint, remove_breakpoint>: Now
3457 TARGET_DEFAULT_NORETURN methods.
3458 <info_proc>: Now returns bool.
3460 (OPS_MAGIC): Delete.
3461 (current_target): Delete. All references replaced by references
3463 (target_stack): ... this. New.
3464 (target_shortname, target_longname): Adjust.
3465 (target_can_run): Now a function declaration.
3466 (default_child_has_all_memory, default_child_has_memory)
3467 (default_child_has_stack, default_child_has_registers)
3468 (default_child_has_execution): Remove target_ops parameter.
3469 (complete_target_initialization): Delete.
3470 (memory_breakpoint_target): New template class.
3471 (test_target_ops): Refactor as a C++ class with virtual methods.
3472 * make-target-delegates (NAME_PART): Tighten.
3473 (POINTER_PART, CP_SYMBOL): New.
3474 (SIMPLE_RETURN_PART): Reimplement.
3475 (VEC_RETURN_PART): Expect less.
3476 (RETURN_PART, VIRTUAL_PART): New.
3477 (METHOD): Adjust to C++ virtual methods.
3478 (scan_target_h): Remove reference to C99.
3479 (dname): Output "target_ops::" prefix.
3480 (write_function_header): Adjust to output a C++ class method.
3481 (write_declaration): New.
3482 (write_delegator): Adjust to output a C++ class method.
3483 (tdname): Output "dummy_target::" prefix.
3484 (write_tdefault, write_debugmethod): Adjust to output a C++ class
3486 (tdefault_names, debug_names): Delete.
3487 (return_types, tdefaults, styles, argtypes_array): New.
3488 (top level): All methods are delegators.
3490 (top level): Print dummy_target and debug_target classes.
3491 * target-delegates.c: Regenerate.
3492 * target-debug.h (target_debug_print_enum_info_proc_what)
3493 (target_debug_print_thread_control_capabilities)
3494 (target_debug_print_thread_info_p): New.
3495 * target.c (dummy_target): Delete.
3496 (the_dummy_target, the_debug_target): New.
3497 (target_stack): Now extern.
3498 (set_targetdebug): Push/unpush debug target.
3499 (default_child_has_all_memory, default_child_has_memory)
3500 (default_child_has_stack, default_child_has_registers)
3501 (default_child_has_execution): Remove target_ops parameter.
3502 (complete_target_initialization): Delete.
3503 (add_target_with_completer): No longer call
3504 complete_target_initialization.
3505 (target_supports_terminal_ours): Use regular delegation.
3506 (update_current_target): Delete.
3507 (push_target): No longer check magic number. Don't call
3508 update_current_target.
3509 (unpush_target): Don't call update_current_target.
3510 (target_is_pushed): No longer check magic number.
3511 (target_require_runnable): Skip for all stratums over
3513 (target_ops::info_proc): New.
3514 (target_info_proc): Use find_target_at and
3515 find_default_run_target.
3516 (target_supports_disable_randomization): Use regular delegation.
3517 (target_get_osdata): Use find_target_at.
3518 (target_ops::open, target_ops::close, target_ops::can_attach)
3519 (target_ops::attach, target_ops::can_create_inferior)
3520 (target_ops::create_inferior, target_ops::can_run)
3521 (target_can_run): New.
3522 (default_fileio_target): Use regular delegation.
3523 (target_ops::fileio_open, target_ops::fileio_pwrite)
3524 (target_ops::fileio_pread, target_ops::fileio_fstat)
3525 (target_ops::fileio_close, target_ops::fileio_unlink)
3526 (target_ops::fileio_readlink): New.
3527 (target_fileio_open_1, target_fileio_unlink)
3528 (target_fileio_readlink): Always call the target method. Handle
3530 (return_zero, return_zero_has_execution): Delete.
3531 (init_dummy_target): Delete.
3532 (dummy_target::dummy_target, dummy_target::shortname)
3533 (dummy_target::longname, dummy_target::doc)
3534 (debug_target::debug_target, debug_target::shortname)
3535 (debug_target::longname, debug_target::doc): New.
3536 (target_supports_delete_record): Use regular delegation.
3537 (setup_target_debug): Delete.
3538 (maintenance_print_target_stack): Skip debug_stratum.
3539 (initialize_targets): Instantiate the_dummy_target and
3541 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
3543 (target_auxv_search, fprint_target_auxv): Adjust.
3544 (info_auxv_command): Adjust to use target_stack.
3545 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
3546 * exceptions.c (print_flush): Handle a NULL target_stack.
3547 * regcache.c (target_ops_no_register): Refactor as class with
3550 * exec.c (exec_target): New class.
3551 (exec_ops): Now an exec_target.
3552 (exec_open, exec_close_1, exec_get_section_table)
3553 (exec_xfer_partial, exec_files_info, exec_has_memory)
3554 (exec_make_note_section): Refactor as exec_target methods.
3555 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
3557 (exec_target::find_memory_regions): New.
3558 (_initialize_exec): Don't call init_exec_ops.
3559 * gdbcore.h (exec_file_clear): Delete.
3561 * corefile.c (core_target): Delete.
3562 (core_file_command): Adjust.
3563 * corelow.c (core_target): New class.
3564 (the_core_target): New.
3565 (core_close): Remove target_ops parameter.
3566 (core_close_cleanup): Adjust.
3567 (core_target::close): New.
3568 (core_open, core_detach, get_core_registers, core_files_info)
3569 (core_xfer_partial, core_thread_alive, core_read_description)
3570 (core_pid_to_str, core_thread_name, core_has_memory)
3571 (core_has_stack, core_has_registers, core_info_proc): Rework as
3572 core_target methods.
3573 (ignore, core_remove_breakpoint, init_core_ops): Delete.
3574 (_initialize_corelow): Initialize the_core_target.
3575 * gdbcore.h (core_target): Delete.
3576 (the_core_target): New.
3578 * ctf.c: (ctf_target): New class.
3579 (ctf_ops): Now a ctf_target.
3580 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
3581 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
3582 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
3584 (init_ctf_ops): Delete.
3585 (_initialize_ctf): Don't call it.
3586 * tracefile-tfile.c (tfile_target): New class.
3587 (tfile_ops): Now a tfile_target.
3588 (tfile_open, tfile_close, tfile_files_info)
3589 (tfile_get_tracepoint_status, tfile_trace_find)
3590 (tfile_fetch_registers, tfile_xfer_partial)
3591 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
3592 Refactor as tfile_target methods.
3593 (tfile_xfer_partial_features): Remove target_ops parameter.
3594 (init_tfile_ops): Delete.
3595 (_initialize_tracefile_tfile): Don't call it.
3596 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
3597 (tracefile_has_stack, tracefile_has_registers)
3598 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
3599 tracefile_target methods.
3600 (init_tracefile_ops): Delete.
3601 (tracefile_target::tracefile_target): New.
3602 * tracefile.h: Include "target.h".
3603 (tracefile_target): New class.
3604 (init_tracefile_ops): Delete.
3606 * spu-multiarch.c (spu_multiarch_target): New class.
3607 (spu_ops): Now a spu_multiarch_target.
3608 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
3609 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
3610 (spu_search_memory, spu_mourn_inferior): Refactor as
3611 spu_multiarch_target methods.
3612 (init_spu_ops): Delete.
3613 (_initialize_spu_multiarch): Remove references to init_spu_ops,
3614 complete_target_initialization.
3616 * ravenscar-thread.c (ravenscar_thread_target): New class.
3617 (ravenscar_ops): Now a ravenscar_thread_target.
3618 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
3619 (ravenscar_thread_alive, ravenscar_pid_to_str)
3620 (ravenscar_fetch_registers, ravenscar_store_registers)
3621 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
3622 (ravenscar_stopped_by_hw_breakpoint)
3623 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
3624 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
3625 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
3627 (init_ravenscar_thread_ops): Delete.
3628 (_initialize_ravenscar): Remove references to
3629 init_ravenscar_thread_ops and complete_target_initialization.
3631 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3632 (bsd_uthread_target): New class.
3633 (bsd_uthread_ops): Now a bsd_uthread_target.
3634 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3635 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3636 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3637 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3638 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3639 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3640 (bsd_uthread_target): Delete function.
3641 (_initialize_bsd_uthread): Remove reference to
3642 complete_target_initialization.
3644 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3645 (target_bfd): ... this new class.
3646 (target_bfd_xfer_partial, target_bfd_get_section_table)
3647 (target_bfd_close): Refactor as target_bfd methods.
3648 (target_bfd::~target_bfd): New.
3649 (target_bfd_reopen): Adjust.
3650 (target_bfd::close): New.
3652 * record-btrace.c (record_btrace_target): New class.
3653 (record_btrace_ops): Now a record_btrace_target.
3654 (record_btrace_open, record_btrace_stop_recording)
3655 (record_btrace_disconnect, record_btrace_close)
3656 (record_btrace_async, record_btrace_info)
3657 (record_btrace_insn_history, record_btrace_insn_history_range)
3658 (record_btrace_insn_history_from, record_btrace_call_history)
3659 (record_btrace_call_history_range)
3660 (record_btrace_call_history_from, record_btrace_record_method)
3661 (record_btrace_is_replaying, record_btrace_will_replay)
3662 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3663 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3664 (record_btrace_store_registers, record_btrace_prepare_to_store)
3665 (record_btrace_to_get_unwinder)
3666 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3667 (record_btrace_commit_resume, record_btrace_wait)
3668 (record_btrace_stop, record_btrace_can_execute_reverse)
3669 (record_btrace_stopped_by_sw_breakpoint)
3670 (record_btrace_supports_stopped_by_sw_breakpoint)
3671 (record_btrace_stopped_by_hw_breakpoint)
3672 (record_btrace_supports_stopped_by_hw_breakpoint)
3673 (record_btrace_update_thread_list, record_btrace_thread_alive)
3674 (record_btrace_goto_begin, record_btrace_goto_end)
3675 (record_btrace_goto, record_btrace_stop_replaying_all)
3676 (record_btrace_execution_direction)
3677 (record_btrace_prepare_to_generate_core)
3678 (record_btrace_done_generating_core): Refactor as
3679 record_btrace_target methods.
3680 (init_record_btrace_ops): Delete.
3681 (_initialize_record_btrace): Remove reference to
3682 init_record_btrace_ops.
3683 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3684 the execution_direction global.
3685 (record_full_base_target, record_full_target)
3686 (record_full_core_target): New classes.
3687 (record_full_ops): Now a record_full_target.
3688 (record_full_core_ops): Now a record_full_core_target.
3689 (record_full_target::detach, record_full_target::disconnect)
3690 (record_full_core_target::disconnect)
3691 (record_full_target::mourn_inferior, record_full_target::kill):
3693 (record_full_open, record_full_close, record_full_async): Refactor
3694 as methods of the record_full_base_target class.
3695 (record_full_resume, record_full_commit_resume): Refactor
3696 as methods of the record_full_target class.
3697 (record_full_wait, record_full_stopped_by_watchpoint)
3698 (record_full_stopped_data_address)
3699 (record_full_stopped_by_sw_breakpoint)
3700 (record_full_supports_stopped_by_sw_breakpoint)
3701 (record_full_stopped_by_hw_breakpoint)
3702 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3703 methods of the record_full_base_target class.
3704 (record_full_store_registers, record_full_xfer_partial)
3705 (record_full_insert_breakpoint, record_full_remove_breakpoint):
3706 Refactor as methods of the record_full_target class.
3707 (record_full_can_execute_reverse, record_full_get_bookmark)
3708 (record_full_goto_bookmark, record_full_execution_direction)
3709 (record_full_record_method, record_full_info, record_full_delete)
3710 (record_full_is_replaying, record_full_will_replay)
3711 (record_full_goto_begin, record_full_goto_end, record_full_goto)
3712 (record_full_stop_replaying): Refactor as methods of the
3713 record_full_base_target class.
3714 (record_full_core_resume, record_full_core_kill)
3715 (record_full_core_fetch_registers)
3716 (record_full_core_prepare_to_store)
3717 (record_full_core_store_registers, record_full_core_xfer_partial)
3718 (record_full_core_insert_breakpoint)
3719 (record_full_core_remove_breakpoint)
3720 (record_full_core_has_execution): Refactor
3721 as methods of the record_full_core_target class.
3722 (record_full_base_target::supports_delete_record): New.
3723 (init_record_full_ops): Delete.
3724 (init_record_full_core_ops): Delete.
3725 (record_full_save): Refactor as method of the
3726 record_full_base_target class.
3727 (_initialize_record_full): Remove references to
3728 init_record_full_ops and init_record_full_core_ops.
3730 * remote.c (remote_target, extended_remote_target): New classes.
3731 (remote_ops): Now a remote_target.
3732 (extended_remote_ops): Now an extended_remote_target.
3733 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3734 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3735 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3736 (remote_pass_signals, remote_set_syscall_catchpoint)
3737 (remote_program_signals, )
3738 (remote_thread_always_alive): Remove target_ops parameter.
3739 (remote_thread_alive, remote_thread_name)
3740 (remote_update_thread_list, remote_threads_extra_info)
3741 (remote_static_tracepoint_marker_at)
3742 (remote_static_tracepoint_markers_by_strid)
3743 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3744 (remote_open): Refactor as methods of remote_target.
3745 (extended_remote_open, extended_remote_detach)
3746 (extended_remote_attach, extended_remote_post_attach):
3747 (extended_remote_supports_disable_randomization)
3748 (extended_remote_create_inferior): : Refactor as method of
3749 extended_remote_target.
3750 (remote_set_permissions, remote_open_1, remote_detach)
3751 (remote_follow_fork, remote_follow_exec, remote_disconnect)
3752 (remote_resume, remote_commit_resume, remote_stop)
3753 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3754 (remote_terminal_ours, remote_wait, remote_fetch_registers)
3755 (remote_prepare_to_store, remote_store_registers)
3756 (remote_flash_erase, remote_flash_done, remote_files_info)
3757 (remote_kill, remote_mourn, remote_insert_breakpoint)
3758 (remote_remove_breakpoint, remote_insert_watchpoint)
3759 (remote_watchpoint_addr_within_range)
3760 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3761 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3762 (remote_supports_stopped_by_sw_breakpoint)
3763 (remote_stopped_by_hw_breakpoint)
3764 (remote_supports_stopped_by_hw_breakpoint)
3765 (remote_stopped_by_watchpoint, remote_stopped_data_address)
3766 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3767 (remote_verify_memory): Refactor as methods of remote_target.
3768 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3770 (remote_xfer_partial, remote_get_memory_xfer_limit)
3771 (remote_search_memory, remote_rcmd, remote_memory_map)
3772 (remote_pid_to_str, remote_get_thread_local_address)
3773 (remote_get_tib_address, remote_read_description): Refactor as
3774 methods of remote_target.
3775 (remote_target::fileio_open, remote_target::fileio_pwrite)
3776 (remote_target::fileio_pread, remote_target::fileio_close): New.
3777 (remote_hostio_readlink, remote_hostio_fstat)
3778 (remote_filesystem_is_local, remote_can_execute_reverse)
3779 (remote_supports_non_stop, remote_supports_disable_randomization)
3780 (remote_supports_multi_process, remote_supports_cond_breakpoints)
3781 (remote_supports_enable_disable_tracepoint)
3782 (remote_supports_string_tracing)
3783 (remote_can_run_breakpoint_commands, remote_trace_init)
3784 (remote_download_tracepoint, remote_can_download_tracepoint)
3785 (remote_download_trace_state_variable, remote_enable_tracepoint)
3786 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3787 (remote_trace_start, remote_get_trace_status)
3788 (remote_get_tracepoint_status, remote_trace_stop)
3789 (remote_trace_find, remote_get_trace_state_variable_value)
3790 (remote_save_trace_data, remote_get_raw_trace_data)
3791 (remote_set_disconnected_tracing, remote_core_of_thread)
3792 (remote_set_circular_trace_buffer, remote_traceframe_info)
3793 (remote_get_min_fast_tracepoint_insn_len)
3794 (remote_set_trace_buffer_size, remote_set_trace_notes)
3795 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3796 (remote_disable_btrace, remote_teardown_btrace)
3797 (remote_read_btrace, remote_btrace_conf)
3798 (remote_augmented_libraries_svr4_read, remote_load)
3799 (remote_pid_to_exec_file, remote_can_do_single_step)
3800 (remote_execution_direction, remote_thread_handle_to_thread_info):
3801 Refactor as methods of remote_target.
3802 (init_remote_ops, init_extended_remote_ops): Delete.
3803 (remote_can_async_p, remote_is_async_p, remote_async)
3804 (remote_thread_events, remote_upload_tracepoints)
3805 (remote_upload_trace_state_variables): Refactor as methods of
3807 (_initialize_remote): Remove references to init_remote_ops and
3808 init_extended_remote_ops.
3810 * remote-sim.c (gdbsim_target): New class.
3811 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3812 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3813 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3814 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3815 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3816 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3817 Refactor as methods of gdbsim_target.
3818 (gdbsim_ops): Now a gdbsim_target.
3819 (init_gdbsim_ops): Delete.
3820 (gdbsim_cntrl_c): Adjust.
3821 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3823 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3824 (the_amd64_linux_nat_target): New.
3825 (amd64_linux_fetch_inferior_registers)
3826 (amd64_linux_store_inferior_registers): Refactor as methods of
3827 amd64_linux_nat_target.
3828 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
3829 * i386-linux-nat.c: Don't include "linux-nat.h".
3830 (i386_linux_nat_target): New class.
3831 (the_i386_linux_nat_target): New.
3832 (i386_linux_fetch_inferior_registers)
3833 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3834 as methods of i386_linux_nat_target.
3835 (_initialize_i386_linux_nat): Adjust. Set linux_target.
3836 * inf-child.c (inf_child_ops): Delete.
3837 (inf_child_fetch_inferior_registers)
3838 (inf_child_store_inferior_registers): Delete.
3839 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3840 methods of inf_child_target.
3841 (inf_child_target::supports_terminal_ours)
3842 (inf_child_target::terminal_init)
3843 (inf_child_target::terminal_inferior)
3844 (inf_child_target::terminal_ours_for_output)
3845 (inf_child_target::terminal_ours, inf_child_target::interrupt)
3846 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3848 (inf_child_open, inf_child_disconnect, inf_child_close)
3849 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3850 (inf_child_post_startup_inferior, inf_child_can_run)
3851 (inf_child_pid_to_exec_file): Refactor as methods of
3853 (inf_child_follow_fork): Delete.
3854 (inf_child_target::can_create_inferior)
3855 (inf_child_target::can_attach): New.
3856 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3857 (inf_child_target::has_stack, inf_child_target::has_registers)
3858 (inf_child_target::has_execution): New.
3859 (inf_child_fileio_open, inf_child_fileio_pwrite)
3860 (inf_child_fileio_pread, inf_child_fileio_fstat)
3861 (inf_child_fileio_close, inf_child_fileio_unlink)
3862 (inf_child_fileio_readlink, inf_child_use_agent)
3863 (inf_child_can_use_agent): Refactor as methods of
3865 (return_zero, inf_child_target): Delete.
3866 (inf_child_target::inf_child_target): New.
3867 * inf-child.h: Include "target.h".
3868 (inf_child_target): Delete function prototype.
3869 (inf_child_target): New class.
3870 (inf_child_open_target, inf_child_mourn_inferior)
3871 (inf_child_maybe_unpush_target): Delete.
3872 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3873 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3874 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3875 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3876 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3877 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3878 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3879 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3880 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3881 methods of inf_ptrace_target.
3882 (inf_ptrace_target): Delete function.
3883 * inf-ptrace.h: Include "inf-child.h".
3884 (inf_ptrace_target): Delete function declaration.
3885 (inf_ptrace_target): New class.
3886 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3887 * linux-nat.c (linux_target): New.
3888 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3889 (linux_nat_target::~linux_nat_target): New.
3890 (linux_child_post_attach, linux_child_post_startup_inferior)
3891 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3892 (linux_child_remove_fork_catchpoint)
3893 (linux_child_insert_vfork_catchpoint)
3894 (linux_child_remove_vfork_catchpoint)
3895 (linux_child_insert_exec_catchpoint)
3896 (linux_child_remove_exec_catchpoint)
3897 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3898 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3899 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3900 (linux_nat_stopped_data_address)
3901 (linux_nat_stopped_by_sw_breakpoint)
3902 (linux_nat_supports_stopped_by_sw_breakpoint)
3903 (linux_nat_stopped_by_hw_breakpoint)
3904 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3905 (linux_nat_kill, linux_nat_mourn_inferior)
3906 (linux_nat_xfer_partial, linux_nat_thread_alive)
3907 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3908 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3909 (linux_child_static_tracepoint_markers_by_strid)
3910 (linux_nat_is_async_p, linux_nat_can_async_p)
3911 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3912 (linux_nat_supports_multi_process)
3913 (linux_nat_supports_disable_randomization, linux_nat_async)
3914 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3915 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3916 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3917 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3918 methods of linux_nat_target.
3919 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3920 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3922 (check_stopped_by_watchpoint): Adjust.
3923 (linux_xfer_partial): Delete.
3924 (linux_target_install_ops, linux_target, linux_nat_add_target):
3926 (linux_nat_target::linux_nat_target): New.
3927 * linux-nat.h: Include "inf-ptrace.h".
3928 (linux_nat_target): New.
3929 (linux_target, linux_target_install_ops, linux_nat_add_target):
3930 Delete function declarations.
3931 (linux_target): Declare global.
3932 * linux-thread-db.c (thread_db_target): New.
3933 (thread_db_target::thread_db_target): New.
3934 (thread_db_ops): Delete.
3935 (the_thread_db_target): New.
3936 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3937 (thread_db_update_thread_list, thread_db_pid_to_str)
3938 (thread_db_extra_thread_info)
3939 (thread_db_thread_handle_to_thread_info)
3940 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3941 (thread_db_resume): Refactor as methods of thread_db_target.
3942 (init_thread_db_ops): Delete.
3943 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3944 * x86-linux-nat.c: Don't include "linux-nat.h".
3945 (super_post_startup_inferior): Delete.
3946 (x86_linux_nat_target::~x86_linux_nat_target): New.
3947 (x86_linux_child_post_startup_inferior)
3948 (x86_linux_read_description, x86_linux_enable_btrace)
3949 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3950 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3951 methods of x86_linux_nat_target.
3952 (x86_linux_create_target): Delete. Bits folded ...
3953 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3955 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3956 (x86_linux_nat_target): New class.
3957 (x86_linux_create_target): Delete.
3958 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3959 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3960 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3961 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3962 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3963 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3965 (x86_use_watchpoints): Delete.
3966 * x86-nat.h: Include "breakpoint.h" and "target.h".
3967 (x86_use_watchpoints): Delete.
3968 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3969 (x86_stopped_by_watchpoint, x86_stopped_data_address)
3970 (x86_insert_watchpoint, x86_remove_watchpoint)
3971 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3972 (x86_stopped_by_hw_breakpoint): New declarations.
3973 (x86_nat_target): New template class.
3975 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3976 (the_ppc_linux_nat_target): New.
3977 (ppc_linux_fetch_inferior_registers)
3978 (ppc_linux_can_use_hw_breakpoint)
3979 (ppc_linux_region_ok_for_hw_watchpoint)
3980 (ppc_linux_ranged_break_num_registers)
3981 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3982 (ppc_linux_insert_mask_watchpoint)
3983 (ppc_linux_remove_mask_watchpoint)
3984 (ppc_linux_can_accel_watchpoint_condition)
3985 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3986 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3987 (ppc_linux_watchpoint_addr_within_range)
3988 (ppc_linux_masked_watch_num_registers)
3989 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3990 (ppc_linux_read_description): Refactor as methods of
3991 ppc_linux_nat_target.
3992 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
3994 * procfs.c (procfs_xfer_partial): Delete forward declaration.
3995 (procfs_target): New class.
3996 (the_procfs_target): New.
3997 (procfs_target): Delete function.
3998 (procfs_auxv_parse, procfs_attach, procfs_detach)
3999 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4000 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4001 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4002 (procfs_create_inferior, procfs_update_thread_list)
4003 (procfs_thread_alive, procfs_pid_to_str)
4004 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4005 (procfs_stopped_data_address, procfs_insert_watchpoint)
4006 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4007 (proc_find_memory_regions, procfs_info_proc)
4008 (procfs_make_note_section): Refactor as methods of procfs_target.
4009 (_initialize_procfs): Adjust.
4010 * sol-thread.c (sol_thread_target): New class.
4011 (sol_thread_ops): Now a sol_thread_target.
4012 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4013 (sol_thread_fetch_registers, sol_thread_store_registers)
4014 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4015 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4016 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4017 (init_sol_thread_ops): Delete.
4018 (_initialize_sol_thread): Adjust. Remove references to
4019 init_sol_thread_ops and complete_target_initialization.
4021 * windows-nat.c (windows_nat_target): New class.
4022 (windows_fetch_inferior_registers)
4023 (windows_store_inferior_registers, windows_resume, windows_wait)
4024 (windows_attach, windows_detach, windows_pid_to_exec_file)
4025 (windows_files_info, windows_create_inferior)
4026 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4027 (windows_close, windows_pid_to_str, windows_xfer_partial)
4028 (windows_get_tib_address, windows_get_ada_task_ptid)
4029 (windows_thread_name, windows_thread_alive): Refactor as
4030 windows_nat_target methods.
4031 (do_initial_windows_stuff): Adjust.
4032 (windows_target): Delete function.
4033 (_initialize_windows_nat): Adjust.
4035 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4036 (darwin_mourn_inferior, darwin_kill_inferior)
4037 (darwin_create_inferior, darwin_attach, darwin_detach)
4038 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4039 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4040 (darwin_supports_multi_process): Refactor as darwin_nat_target
4042 (darwin_resume_to, darwin_files_info): Delete.
4043 (_initialize_darwin_inferior): Rename to ...
4044 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4045 * darwin-nat.h: Include "inf-child.h".
4046 (darwin_nat_target): New class.
4047 (darwin_complete_target): Delete.
4048 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4049 (darwin_target): New.
4050 (i386_darwin_fetch_inferior_registers)
4051 (i386_darwin_store_inferior_registers): Refactor as methods of
4053 (darwin_complete_target): Delete, with ...
4054 (_initialize_i386_darwin_nat): ... bits factored out here.
4056 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4057 (the_alpha_linux_nat_target): New.
4058 (alpha_linux_register_u_offset): Refactor as
4059 alpha_linux_nat_target method.
4060 (_initialize_alpha_linux_nat): Adjust.
4061 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4062 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4063 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4064 methods of linux_nat_trad_target.
4065 (linux_trad_target): Delete.
4066 * linux-nat-trad.h (linux_trad_target): Delete function.
4067 (linux_nat_trad_target): New class.
4068 * mips-linux-nat.c (mips_linux_nat_target): New class.
4069 (super_fetch_registers, super_store_registers, super_close):
4071 (the_mips_linux_nat_target): New.
4072 (mips64_linux_regsets_fetch_registers)
4073 (mips64_linux_regsets_store_registers)
4074 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4075 (mips_linux_register_u_offset, mips_linux_read_description)
4076 (mips_linux_can_use_hw_breakpoint)
4077 (mips_linux_stopped_by_watchpoint)
4078 (mips_linux_stopped_data_address)
4079 (mips_linux_region_ok_for_hw_watchpoint)
4080 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4081 (mips_linux_close): Refactor as methods of mips_linux_nat.
4082 (_initialize_mips_linux_nat): Adjust to C++ification.
4084 * aix-thread.c (aix_thread_target): New class.
4085 (aix_thread_ops): Now an aix_thread_target.
4086 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4087 (aix_thread_fetch_registers, aix_thread_store_registers)
4088 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4089 (aix_thread_thread_alive, aix_thread_pid_to_str)
4090 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4091 Refactor as methods of aix_thread_target.
4092 (init_aix_thread_ops): Delete.
4093 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4094 and complete_target_initialization.
4095 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4096 (rs6000_nat_target): New class.
4097 (the_rs6000_nat_target): New.
4098 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4099 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4100 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4101 (super_create_inferior): Delete.
4102 (_initialize_rs6000_nat): Adjust to C++ification.
4104 * arm-linux-nat.c (arm_linux_nat_target): New class.
4105 (the_arm_linux_nat_target): New.
4106 (arm_linux_fetch_inferior_registers)
4107 (arm_linux_store_inferior_registers, arm_linux_read_description)
4108 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4109 (arm_linux_remove_hw_breakpoint)
4110 (arm_linux_region_ok_for_hw_watchpoint)
4111 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4112 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4113 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4114 arm_linux_nat_target.
4115 (_initialize_arm_linux_nat): Adjust to C++ification.
4117 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4118 (the_aarch64_linux_nat_target): New.
4119 (aarch64_linux_fetch_inferior_registers)
4120 (aarch64_linux_store_inferior_registers)
4121 (aarch64_linux_child_post_startup_inferior)
4122 (aarch64_linux_read_description)
4123 (aarch64_linux_can_use_hw_breakpoint)
4124 (aarch64_linux_insert_hw_breakpoint)
4125 (aarch64_linux_remove_hw_breakpoint)
4126 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4127 (aarch64_linux_region_ok_for_hw_watchpoint)
4128 (aarch64_linux_stopped_data_address)
4129 (aarch64_linux_stopped_by_watchpoint)
4130 (aarch64_linux_watchpoint_addr_within_range)
4131 (aarch64_linux_can_do_single_step): Refactor as methods of
4132 aarch64_linux_nat_target.
4133 (super_post_startup_inferior): Delete.
4134 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4136 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4137 (the_hppa_linux_nat_target): New.
4138 (hppa_linux_fetch_inferior_registers)
4139 (hppa_linux_store_inferior_registers): Refactor as methods of
4140 hppa_linux_nat_target.
4141 (_initialize_hppa_linux_nat): Adjust to C++ification.
4143 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4144 (the_ia64_linux_nat_target): New.
4145 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4146 (ia64_linux_stopped_data_address)
4147 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4148 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4149 ia64_linux_nat_target methods.
4150 (super_xfer_partial): Delete.
4151 (_initialize_ia64_linux_nat): Adjust to C++ification.
4153 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4154 (the_m32r_linux_nat_target): New.
4155 (m32r_linux_fetch_inferior_registers)
4156 (m32r_linux_store_inferior_registers): Refactor as
4157 m32r_linux_nat_target methods.
4158 (_initialize_m32r_linux_nat): Adjust to C++ification.
4160 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4161 (the_m68k_linux_nat_target): New.
4162 (m68k_linux_fetch_inferior_registers)
4163 (m68k_linux_store_inferior_registers): Refactor as
4164 m68k_linux_nat_target methods.
4165 (_initialize_m68k_linux_nat): Adjust to C++ification.
4167 * s390-linux-nat.c (s390_linux_nat_target): New class.
4168 (the_s390_linux_nat_target): New.
4169 (s390_linux_fetch_inferior_registers)
4170 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4171 (s390_insert_watchpoint, s390_remove_watchpoint)
4172 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4173 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4174 (s390_auxv_parse, s390_read_description): Refactor as methods of
4175 s390_linux_nat_target.
4176 (_initialize_s390_nat): Adjust to C++ification.
4178 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4179 (the_sparc_linux_nat_target): New.
4180 (_initialize_sparc_linux_nat): Adjust to C++ification.
4181 * sparc-nat.c (sparc_fetch_inferior_registers)
4182 (sparc_store_inferior_registers): Remove target_ops parameter.
4183 * sparc-nat.h (sparc_fetch_inferior_registers)
4184 (sparc_store_inferior_registers): Remove target_ops parameter.
4185 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4186 (the_sparc64_linux_nat_target): New.
4187 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4189 * spu-linux-nat.c (spu_linux_nat_target): New class.
4190 (the_spu_linux_nat_target): New.
4191 (spu_child_post_startup_inferior, spu_child_post_attach)
4192 (spu_child_wait, spu_fetch_inferior_registers)
4193 (spu_store_inferior_registers, spu_xfer_partial)
4194 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4196 (_initialize_spu_nat): Adjust to C++ification.
4198 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4199 (the_tilegx_linux_nat_target): New.
4200 (fetch_inferior_registers, store_inferior_registers):
4201 Refactor as methods.
4202 (_initialize_tile_linux_nat): Adjust to C++ification.
4204 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4205 (the_xtensa_linux_nat_target): New.
4206 (xtensa_linux_fetch_inferior_registers)
4207 (xtensa_linux_store_inferior_registers): Refactor as
4208 xtensa_linux_nat_target methods.
4209 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4211 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4212 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4213 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4214 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4215 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4216 (fbsd_stopped_by_sw_breakpoint)
4217 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4218 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4219 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4220 (fbsd_post_startup_inferior, fbsd_post_attach)
4221 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4222 (fbsd_set_syscall_catchpoint)
4223 (super_xfer_partial, super_resume, super_wait)
4224 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4225 (fbsd_handle_debug_trap): Remove target_ops parameter.
4226 (fbsd_nat_add_target): Delete.
4227 * fbsd-nat.h: Include "inf-ptrace.h".
4228 (fbsd_nat_add_target): Delete.
4229 (USE_SIGTRAP_SIGINFO): Define.
4230 (fbsd_nat_target): New class.
4232 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4233 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4234 (amd64bsd_target): Delete.
4235 * amd64-bsd-nat.h: New file.
4236 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4238 (amd64_fbsd_nat_target): New class.
4239 (the_amd64_fbsd_nat_target): New.
4240 (amd64fbsd_read_description): Refactor as method of
4241 amd64_fbsd_nat_target.
4242 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4243 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4244 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4245 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4246 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4247 (i386bsd_target): Delete.
4248 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4249 (i386bsd_fetch_inferior_registers)
4250 (i386bsd_store_inferior_registers): Declare.
4251 (i386_bsd_nat_target): New class.
4252 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4253 (the_i386_fbsd_nat_target): New.
4254 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4255 i386_fbsd_nat_target methods.
4256 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4257 (_initialize_i386fbsd_nat): Adjust to C++ification.
4258 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4259 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4260 (_initialize_x86_bsd_nat): Adjust to C++ification.
4261 * x86-bsd-nat.h: Include "x86-nat.h".
4262 (x86bsd_target): Delete declaration.
4263 (x86bsd_nat_target): New class.
4265 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4266 (the_aarch64_fbsd_nat_target): New.
4267 (aarch64_fbsd_fetch_inferior_registers)
4268 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4269 aarch64_fbsd_nat_target.
4270 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4271 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4272 (the_alpha_bsd_nat_target): New.
4273 (alphabsd_fetch_inferior_registers)
4274 (alphabsd_store_inferior_registers): Refactor as
4275 alpha_bsd_nat_target methods.
4276 (_initialize_alphabsd_nat): Refactor as methods of
4277 alpha_bsd_nat_target.
4278 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4279 (the_amd64_nbsd_nat_target): New.
4280 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4281 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4282 (the_amd64_obsd_nat_target): New.
4283 (_initialize_amd64obsd_nat): Adjust to C++ification.
4284 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4285 (the_arm_fbsd_nat_target): New.
4286 (arm_fbsd_fetch_inferior_registers)
4287 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4288 (_initialize_arm_fbsd_nat): Refactor as methods of
4289 arm_fbsd_nat_target.
4290 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4291 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4292 (the_arm_netbsd_nat_target): New.
4293 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4294 arm_netbsd_nat_target.
4295 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4296 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4297 (the_hppa_nbsd_nat_target): New.
4298 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4299 hppa_nbsd_nat_target methods.
4300 (_initialize_hppanbsd_nat): Adjust to C++ification.
4301 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4302 (the_hppa_obsd_nat_target): New.
4303 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
4304 methods of hppa_obsd_nat_target.
4305 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
4307 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
4308 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
4310 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
4311 (_initialize_i386obsd_nat): Use add_target.
4312 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
4313 (the_m68k_bsd_nat_target): New.
4314 (m68kbsd_fetch_inferior_registers)
4315 (m68kbsd_store_inferior_registers): Refactor as methods of
4316 m68k_bsd_nat_target.
4317 (_initialize_m68kbsd_nat): Adjust to C++ification.
4318 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
4319 (the_mips_fbsd_nat_target): New.
4320 (mips_fbsd_fetch_inferior_registers)
4321 (mips_fbsd_store_inferior_registers): Refactor as methods of
4322 mips_fbsd_nat_target.
4323 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
4325 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
4326 (the_mips_nbsd_nat_target): New.
4327 (mipsnbsd_fetch_inferior_registers)
4328 (mipsnbsd_store_inferior_registers): Refactor as methods of
4329 mips_nbsd_nat_target.
4330 (_initialize_mipsnbsd_nat): Adjust to C++ification.
4331 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
4332 (the_mips64_obsd_nat_target): New.
4333 (mips64obsd_fetch_inferior_registers)
4334 (mips64obsd_store_inferior_registers): Refactor as methods of
4335 mips64_obsd_nat_target.
4336 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
4338 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
4340 * nbsd-nat.h: Include "inf-ptrace.h".
4341 (nbsd_nat_target): New class.
4342 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
4343 (obsd_wait): Refactor as methods of obsd_nat_target.
4344 (obsd_add_target): Delete.
4345 * obsd-nat.h: Include "inf-ptrace.h".
4346 (obsd_nat_target): New class.
4347 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
4348 (the_ppc_fbsd_nat_target): New.
4349 (ppcfbsd_fetch_inferior_registers)
4350 (ppcfbsd_store_inferior_registers): Refactor as methods of
4351 ppc_fbsd_nat_target.
4352 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
4354 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
4355 (the_ppc_nbsd_nat_target): New.
4356 (ppcnbsd_fetch_inferior_registers)
4357 (ppcnbsd_store_inferior_registers): Refactor as methods of
4358 ppc_nbsd_nat_target.
4359 (_initialize_ppcnbsd_nat): Adjust to C++ification.
4360 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
4361 (the_ppc_obsd_nat_target): New.
4362 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
4363 methods of ppc_obsd_nat_target.
4364 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
4366 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
4367 (the_sh_nbsd_nat_target): New.
4368 (shnbsd_fetch_inferior_registers)
4369 (shnbsd_store_inferior_registers): Refactor as methods of
4371 (_initialize_shnbsd_nat): Adjust to C++ification.
4372 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
4373 (inf_ptrace_xfer_partial): Delete.
4374 (sparc_xfer_partial, sparc_target): Delete.
4375 * sparc-nat.h (sparc_fetch_inferior_registers)
4376 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
4377 (sparc_target): Delete function declaration.
4378 (sparc_target): New template class.
4379 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
4380 (_initialize_sparcnbsd_nat): Adjust to C++ification.
4381 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
4382 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
4384 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
4385 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
4386 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
4387 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
4389 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
4390 (the_vax_bsd_nat_target): New.
4391 (vaxbsd_fetch_inferior_registers)
4392 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
4394 (_initialize_vaxbsd_nat): Adjust to C++ification.
4396 * bsd-kvm.c (bsd_kvm_target): New class.
4397 (bsd_kvm_ops): Now a bsd_kvm_target.
4398 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
4399 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
4400 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
4402 (bsd_kvm_return_one): Delete.
4403 (bsd_kvm_add_target): Adjust to C++ification.
4405 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
4406 (nto_procfs_target_procfs): New classes.
4407 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
4408 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
4409 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
4410 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
4411 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
4412 (procfs_remove_hw_breakpoint, procfs_resume)
4413 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
4414 (procfs_kill_inferior, procfs_store_registers)
4415 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
4416 as methods of nto_procfs_target.
4417 (nto_procfs_ops): Now an nto_procfs_target_procfs.
4418 (nto_native_ops): Delete.
4419 (procfs_open, procfs_native_open): Delete.
4420 (nto_native_ops): Now an nto_procfs_target_native.
4421 (init_procfs_targets): Adjust to C++ification.
4422 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
4423 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
4424 Refactor as methods of nto_procfs_target.
4426 * go32-nat.c (go32_nat_target): New class.
4427 (the_go32_nat_target): New.
4428 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
4429 (go32_store_registers, go32_xfer_partial, go32_files_info)
4430 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
4431 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
4432 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
4433 (go32_pid_to_str): Refactor as methods of go32_nat_target.
4434 (go32_target): Delete.
4435 (_initialize_go32_nat): Adjust to C++ification.
4437 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
4438 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
4439 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
4440 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
4442 (gnu_target): Delete.
4443 * gnu-nat.h (gnu_target): Delete.
4444 (gnu_nat_target): New class.
4445 * i386-gnu-nat.c (gnu_base_target): New.
4446 (i386_gnu_nat_target): New class.
4447 (the_i386_gnu_nat_target): New.
4448 (_initialize_i386gnu_nat): Adjust to C++ification.
4450 2018-05-02 Pedro Alves <palves@redhat.com>
4452 * bfd-target.c (target_bfd_xclose): Rename to ...
4453 (target_bfd_close): ... this.
4454 (target_bfd_reopen): Adjust.
4455 * target.c (target_close): Remove references to to_xclose.
4456 * target.h (target_ops::to_xclose): Delete.
4457 (target_ops::to_close): Update comments.
4459 2018-05-02 Pedro Alves <palves@redhat.com>
4461 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
4463 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
4464 * inf-ptrace.c (inf_ptrace_register_u_offset)
4465 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4466 (inf_ptrace_store_register, inf_ptrace_store_registers)
4467 (inf_ptrace_trad_target): Move to ...
4468 * linux-nat-trad.c: ... this new file.
4469 * linux-nat-trad.h: New file.
4470 * linux-nat.c (linux_target_install_ops): Make extern.
4471 (linux_trad_target): Delete.
4472 * linux-nat.h (linux_trad_target): Delete declaration.
4473 (linux_target_install_ops): Declare.
4474 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
4477 2018-05-02 Pedro Alves <palves@redhat.com>
4479 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4480 procfs_target/add_target here.
4481 * procfs.c (procfs_target): Make static.
4482 (_initialize_procfs): Call add_target here.
4483 * procfs.h (struct target_ops): Remove forward declaration.
4484 (procfs_target): Remove declaration.
4485 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
4487 2018-05-02 Pedro Alves <palves@redhat.com>
4489 * procfs.c (procfs_stopped_by_watchpoint)
4490 (procfs_insert_watchpoint, procfs_remove_watchpoint)
4491 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
4493 (procfs_use_watchpoints): Delete, move contents...
4494 (procfs_target): ... here.
4495 * procfs.h (procfs_use_watchpoints): Delete declaration.
4496 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
4497 procfs_use_watchpoints.
4498 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
4499 procfs_use_watchpoints.
4501 2018-05-02 Tom Tromey <tom@tromey.com>
4504 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
4505 and var_zuinteger_unlimited.
4506 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
4507 and PARAM_ZUINTEGER_UNLIMITED.
4508 (set_parameter_value): Handle var_zuinteger and
4509 var_zuinteger_unlimited.
4510 (add_setshow_generic): Likewise.
4511 (parmpy_init): Likewise.
4513 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
4516 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
4517 pointer is not null before dereferencing it.
4519 2018-04-30 Tom Tromey <tom@tromey.com>
4521 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
4524 2018-04-30 Tom Tromey <tom@tromey.com>
4526 * breakpoint.c (mention): Remove use of is_mi_like_p.
4527 (print_mention_ranged_breakpoint): Likewise.
4528 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
4531 2018-04-30 Tom Tromey <tom@tromey.com>
4533 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
4535 2018-04-30 Tom Tromey <tom@tromey.com>
4537 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
4538 (info_spu_event_command): Remove some uses of is_mi_like_p.
4540 2018-04-30 Tom Tromey <tom@tromey.com>
4542 * python/py-framefilter.c (py_print_single_arg)
4543 (enumerate_locals, py_print_args, py_print_frame): Remove some
4544 uses of is_mi_like_p.
4546 2018-04-30 Tom Tromey <tom@tromey.com>
4549 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
4550 * ui-out.h (ui_out::is_mi_like_p): Now const.
4551 (ui_out::do_is_mi_like_p): Now const.
4552 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
4554 2018-04-30 Tom Tromey <tom@tromey.com>
4556 * varobj.c (varobj_set_visualizer): Use new_reference.
4557 * python/python.c (gdbpy_decode_line): Use new_reference.
4558 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
4561 2018-04-30 Tom Tromey <tom@tromey.com>
4563 * varobj.c (install_new_value): Use new_reference.
4564 * value.h (value_incref): Return void. Swap intro comment with
4566 * value.c (set_value_parent): Use new_reference.
4567 (value_incref): Return void. Update intro comment.
4568 (release_value): Use new_reference.
4569 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
4571 2018-04-30 Tom Tromey <tom@tromey.com>
4573 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4574 * gdb_bfd.h (new_bfd_ref): Remove.
4575 (gdb_bfd_open): Update comment.
4576 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4577 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
4578 (gdb_bfd_fdopenr): Use new_reference.
4579 * exec.c (exec_file_attach): Use new_reference.
4581 2018-04-30 Tom Tromey <tom@tromey.com>
4583 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
4586 2018-04-30 Tom Tromey <tom@tromey.com>
4588 * jit.c (jit_read_code_entry): Use type_align.
4589 * i386-tdep.c (i386_gdbarch_init): Don't call
4590 set_gdbarch_long_long_align_bit.
4591 * gdbarch.sh: Remove long_long_align_bit.
4592 * gdbarch.c, gdbarch.h: Rebuild.
4593 * arc-tdep.c (arc_type_align): New function.
4594 (arc_gdbarch_init): Use arc_type_align. Don't call
4595 set_gdbarch_long_long_align_bit.
4597 2018-04-30 Tom Tromey <tom@tromey.com>
4599 * rust-lang.c (rust_type_alignment): Remove.
4600 (rust_composite_type): Use type_align.
4602 2018-04-30 Tom Tromey <tom@tromey.com>
4604 * NEWS: Mention Type.align.
4605 * python/py-type.c (typy_get_alignof): New function.
4606 (type_object_getset): Add "alignof".
4608 2018-04-30 Tom Tromey <tom@tromey.com>
4612 * std-operator.def (UNOP_ALIGNOF): New operator.
4613 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
4615 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
4616 * c-lang.c (c_op_print_tab): Add alignof.
4617 * c-exp.y (ALIGNOF): New token.
4618 (exp): Add "ALIGNOF" production.
4619 (ident_tokens): Add _Alignof and alignof.
4621 2018-04-30 Tom Tromey <tom@tromey.com>
4623 * i386-tdep.c (i386_type_align): New function.
4624 (i386_gdbarch_init): Update.
4625 * gdbarch.sh (type_align): New method.
4626 * gdbarch.c, gdbarch.h: Rebuild.
4627 * arch-utils.h (default_type_align): Declare.
4628 * arch-utils.c (default_type_align): New function.
4629 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4630 (struct type) <align_log2>: New field.
4631 <instance_flags>: Now a bitfield.
4632 (TYPE_RAW_ALIGN): New macro.
4633 (type_align, type_raw_align, set_type_align): Declare.
4634 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4636 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4637 (get_alignment, maybe_set_alignment): New functions.
4638 (read_structure_type, read_enumeration_type, read_array_type)
4639 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4640 (read_subrange_type, read_base_type): Set type alignment.
4642 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4644 * dwarf2read.c (read_index_from_section): Use bool.
4646 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4649 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4652 2018-04-29 John Reiser <jreiser@BitWagon.com>
4655 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4656 last step, and do it atomically.
4658 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
4660 * compile/compile-c-types.c (convert_int, convert_float):
4663 2018-04-27 Tom Tromey <tom@tromey.com>
4666 * rust-lang.c (rust_inclusive_range_type_p): New function.
4667 (rust_range): Handle inclusive ranges.
4668 (rust_compute_range): Likewise.
4669 * rust-exp.y (struct rust_op) <inclusive>: New field.
4670 (DOTDOTEQ): New constant.
4671 (range_expr): Add "..=" productions.
4672 (operator_tokens): Add "..=" token.
4673 (ast_range): Add "inclusive" parameter.
4674 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4676 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4678 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4679 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4681 * expprint.c (print_subexp_standard): Handle new bounds values.
4682 (dump_subexp_body_standard): Likewise.
4684 2018-04-27 Tom Tromey <tom@tromey.com>
4686 * configure: Rebuild.
4687 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4688 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4690 (class symbol_needs_eval_context): Likewise.
4691 * dwarf2read.c (mock_mapped_index::symbol_name_count)
4692 (mock_mapped_index::symbol_name_at): Use "override". Remove
4694 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4696 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4697 * aarch64-tdep.c (instruction_reader::read): Use "override".
4698 (instruction_reader_test::read): Likewise.
4699 * arm-tdep.c (instruction_reader::read): Use "override".
4700 (instruction_reader_thumb::read): Likewise.
4702 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
4705 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4706 instead of remote_send.
4707 (remote_send): Remove.
4709 2018-04-26 Pedro Alves <palves@redhat.com>
4711 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4712 find_function_start_sal instead of find_pc_line.
4714 2018-04-26 Pedro Alves <palves@redhat.com>
4716 * breakpoint.c (set_breakpoint_location_function): Handle
4718 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4719 * elfread.c (elf_symtab_read): Give data symbols with
4720 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4721 (elf_rel_plt_read): Update comment.
4722 * linespec.c (convert_linespec_to_sals): Handle
4724 (minsym_found): Handle mst_data_gnu_ifunc.
4725 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4726 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4727 * parse.c (find_minsym_type_and_address): Handle
4729 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4730 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4731 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4733 <mst_data_gnu_ifunc>: New enumerator.
4735 2018-04-26 Pedro Alves <palves@redhat.com>
4737 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4738 (lookup_minimal_symbol_by_pc_section): ... this. Replace
4739 'want_trampoline' parameter by a lookup_msym_prefer parameter.
4741 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4742 (lookup_minimal_symbol_by_pc): Adjust.
4743 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4744 (lookup_solib_trampoline_symbol_by_pc): Adjust.
4745 * minsyms.h (lookup_msym_prefer): New enum.
4746 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4747 parameter by a lookup_msym_prefer parameter.
4749 2018-04-26 Pedro Alves <palves@redhat.com>
4751 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4752 ends in "@plt" instead of looking at the symbol's section.
4754 2018-04-26 Pedro Alves <palves@redhat.com>
4756 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
4758 (find_pc_partial_function_gnu_ifunc): Rename to ...
4759 (find_pc_partial_function): ... this, and remove references to
4761 (find_pc_partial_function): Delete old implementation.
4762 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4764 2018-04-26 Pedro Alves <palves@redhat.com>
4766 * linespec.c (struct bound_minimal_symbol_search_key): New.
4767 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
4768 skip first line if we found a GNU ifunc minimal symbol by name.
4769 (compare_msymbols): Change parameters to work with a destructured
4771 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4774 2018-04-26 Pedro Alves <palves@redhat.com>
4776 * breakpoint.c (set_breakpoint_location_function): Don't resolve
4777 ifunc targets here. Instead, if we have an ifunc minsym, use its
4779 (add_location_to_breakpoint): Store the minsym and the objfile in
4780 the breakpoint location.
4781 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4782 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4783 Record the minsym in the sal.
4784 * symtab.h (symtab_and_line) <msymbol>: New field.
4786 2018-04-26 Pedro Alves <palves@redhat.com>
4788 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4789 unless we actually resolved the ifunc.
4791 2018-04-26 Pedro Alves <palves@redhat.com>
4793 * c-exp.y (variable production): Prefer ifunc minsyms over
4794 regular function symbols.
4795 * symtab.c (find_gnu_ifunc): New function.
4796 * minsyms.h (lookup_msym_prefer): New enum.
4797 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4798 parameter by a lookup_msym_prefer parameter.
4799 * symtab.h (find_gnu_ifunc): New declaration.
4801 2018-04-26 Pedro Alves <palves@redhat.com>
4803 * blockframe.c (find_gnu_ifunc_target_type): New function.
4804 (find_function_type): New.
4805 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4806 return a value with a memory address.
4807 (eval_call): For calls to GNU ifunc functions, try to find the
4808 type of the target function from the type that the resolver
4810 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4812 * infcall.c (find_function_return_type): Delete.
4813 (find_function_addr): Add 'function_type' parameter. For calls to
4814 GNU ifunc functions, try to find the type of the target function
4815 from the type that the resolver returns, and return it via
4817 (call_function_by_hand_dummy): Adjust to use the function type
4818 returned by find_function_addr.
4819 (find_function_addr): Add 'function_type' parameter and move
4821 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4824 2018-04-26 Pedro Alves <palves@redhat.com>
4826 * c-exp.y (variable production): Skip finding an alias for ifunc
4829 2018-04-26 Pedro Alves <palves@redhat.com>
4831 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4833 2018-04-25 Pedro Alves <palves@redhat.com>
4835 * infcmd.c (kill_command): Print the pid as string, not the whole
4836 thread's ptid. Add comment. s/has been killed/killed/ in output
4838 * remote.c (remote_detach_1): Print the pid as string, not the
4839 whole thread's ptid.
4841 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4842 Sergio Durigan Junior <sergiodj@redhat.com>
4843 Pedro Alves <palves@redhat.com>
4845 * infcmd.c (kill_command): Print message when inferior has
4847 * inferior.c (print_inferior_events): Remove 'static'. Set as
4849 (add_inferior): Improve message printed when
4850 'print_inferior_events' is on.
4851 (exit_inferior): Remove message printed when
4852 'print_inferior_events' is on.
4853 (detach_inferior): Improve message printed when
4854 'print_inferior_events' is on.
4855 (initialize_inferiors): Use 'add_inferior_silent' to set
4856 'current_inferior_'.
4857 * inferior.h (print_inferior_events): Declare here as
4859 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4860 '[Detaching...]' messages when 'print_inferior_events' is on.
4861 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4862 as prefix/suffix for messages. Remove periods. Fix erroneous
4863 'Detaching after fork from child...', replace it by '... from
4865 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4866 prefix/suffix when printing 'Detaching...' messages. Print
4867 them when 'print_inferior_events' is on.
4868 * remote.c (remote_detach_1): Print message when detaching
4869 from inferior and '!is_fork_parent'.
4871 2018-04-24 Tom Tromey <tom@tromey.com>
4873 * cli-out.h: Reindent.
4875 2018-04-24 Tom Tromey <tom@tromey.com>
4877 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4878 (cli_ui_out::do_field_string): Use fputs_filtered.
4879 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4881 2018-04-23 Tom Tromey <tom@tromey.com>
4883 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4884 gdb::unique_xmalloc_ptr.
4886 2018-04-23 Tom Tromey <tom@tromey.com>
4888 * configure: Rebuild.
4890 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4893 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4894 prepare_for_testing. Set normal_bp to r_debug_state if target
4897 2018-04-21 Pedro Alves <palves@redhat.com>
4898 Rajendra SY <rajendra.sy@gmail.com>
4900 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4901 * remote.c (extended_remote_attach): In all-stop mode, mark the
4902 thread as executing.
4904 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4906 * thread.c (thread_apply_all_command): Fix comment.
4907 (thread_command): Fix comment.
4909 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4911 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4913 * features/aarch64-core.c (create_feature_aarch64_core):
4915 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4917 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4919 * features/i386/32bit-avx512.c
4920 (create_feature_i386_32bit_avx512): Likewise.
4921 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4923 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4925 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4927 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4929 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4931 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4933 * features/i386/64bit-avx512.c
4934 (create_feature_i386_64bit_avx512): Likewise.
4935 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4937 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4939 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4941 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4943 * features/i386/64bit-segments.c
4944 (create_feature_i386_64bit_segments): Likewise.
4945 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4947 * features/i386/x32-core.c
4948 (create_feature_i386_x32_core): Likewise.
4949 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4950 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4951 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4952 * target-descriptions.c: In generated code, don't pass xml
4955 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4957 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4958 (print_xml_feature::visit_post): Likewise.
4959 (print_xml_feature::visit): Likewise.
4960 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4961 (print_xml_feature): Add new class.
4962 * regformats/regdat.sh: Null xmltarget on feature targets.
4963 * target-descriptions.c (struct target_desc): Add xmltarget.
4964 (maintenance_check_tdesc_xml_convert): Add unittest function.
4965 (tdesc_get_features_xml): Add function to get xml.
4966 (maintenance_check_xml_descriptions): Test xml generation.
4967 * xml-tdesc.c (string_read_description_xml): Add function.
4968 * xml-tdesc.h (string_read_description_xml): Add declaration.
4970 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4972 * features/Makefile: Add feature marker to targets with new style
4973 target descriptions.
4974 * regformats/aarch64.dat: Regenerate.
4975 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4976 * regformats/i386/amd64-avx-linux.dat: Likewise.
4977 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4978 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4979 * regformats/i386/amd64-linux.dat: Likewise.
4980 * regformats/i386/amd64-mpx-linux.dat: Likewise.
4981 * regformats/i386/amd64.dat: Likewise.
4982 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4983 * regformats/i386/i386-avx-linux.dat: Likewise.
4984 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4985 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4986 * regformats/i386/i386-linux.dat: Likewise.
4987 * regformats/i386/i386-mmx-linux.dat: Likewise.
4988 * regformats/i386/i386-mpx-linux.dat: Likewise.
4989 * regformats/i386/i386.dat: Likewise.
4990 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4991 * regformats/i386/x32-avx-linux.dat: Likewise.
4992 * regformats/i386/x32-linux.dat: Likewise.
4993 * regformats/tic6x-c62x-linux.dat: Likewise.
4994 * regformats/tic6x-c64x-linux.dat: Likewise.
4995 * regformats/tic6x-c64xp-linux.dat: Likewise.
4996 * regformats/regdat.sh: Parse feature marker.
4998 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5000 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5001 (tdesc_osabi_name): Likewise.
5002 * target-descriptions.c (tdesc_architecture_name): Add new
5004 (tdesc_osabi_name): Likewise.
5006 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5008 * common/tdesc.c (tdesc_predefined_type): Move to here.
5009 (tdesc_named_type): Likewise.
5010 (tdesc_create_vector): Likewise.
5011 (tdesc_create_struct): Likewise.
5012 (tdesc_set_struct_size): Likewise.
5013 (tdesc_create_union): Likewise.
5014 (tdesc_create_flags): Likewise.
5015 (tdesc_create_enum): Likewise.
5016 (tdesc_add_field): Likewise.
5017 (tdesc_add_typed_bitfield): Likewise.
5018 (tdesc_add_bitfield): Likewise.
5019 (tdesc_add_flag): Likewise.
5020 (tdesc_add_enum_value): Likewise.
5021 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5022 (struct tdesc_type_vector): Likewise.
5023 (struct tdesc_type_field): Likewise.
5024 (struct tdesc_type_with_fields): Likewise.
5025 (tdesc_create_enum): Add declaration.
5026 (tdesc_add_typed_bitfield): Likewise.
5027 (tdesc_add_enum_value): Likewise.
5028 * target-descriptions.c (tdesc_type_field): Move from here.
5029 (tdesc_type_builtin): Likewise.
5030 (tdesc_type_vector): Likewise.
5031 (tdesc_type_with_fields): Likewise.
5032 (tdesc_predefined_types): Likewise.
5033 (tdesc_named_type): Likewise.
5034 (tdesc_create_vector): Likewise.
5035 (tdesc_create_struct): Likewise.
5036 (tdesc_set_struct_size): Likewise.
5037 (tdesc_create_union): Likewise.
5038 (tdesc_create_flags): Likewise.
5039 (tdesc_create_enum): Likewise.
5040 (tdesc_add_field): Likewise.
5041 (tdesc_add_typed_bitfield): Likewise.
5042 (tdesc_add_bitfield): Likewise.
5043 (tdesc_add_flag): Likewise.
5044 (tdesc_add_enum_value): Likewise.
5045 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5046 (tdesc_add_typed_bitfield): Likewise.
5047 (tdesc_add_enum_value): Likewise.
5049 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5051 * common/tdesc.c (tdesc_feature::accept): Move to here.
5052 (tdesc_feature::operator==): Likewise.
5053 (tdesc_create_reg): Likewise.
5054 * common/tdesc.h (tdesc_type_kind): Likewise.
5055 (struct tdesc_type): Likewise.
5056 (struct tdesc_feature): Likewise.
5057 * regformats/regdat.sh: Create a feature.
5058 * target-descriptions.c (tdesc_type_kind): Move from here.
5059 (tdesc_type): Likewise.
5060 (tdesc_type_up): Likewise.
5061 (tdesc_feature): Likewise.
5062 (tdesc_create_reg): Likewise.
5064 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5066 * Makefile.in: Add arch/tdesc.c
5067 * common/tdesc.c: New file.
5068 * common/tdesc.h (tdesc_element_visitor): Move to here.
5069 (tdesc_element): Likewise.
5070 (tdesc_reg): Likewise.
5071 (tdesc_reg_up): Likewise.
5072 * regformats/regdef.h (reg): Add offset to constructors.
5073 * target-descriptions.c (tdesc_element_visitor): Move from here.
5074 (tdesc_element): Likewise.
5075 (tdesc_reg): Likewise.
5076 (tdesc_reg_up): Likewise.
5078 2018-04-17 Tom Tromey <tom@tromey.com>
5080 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5083 2018-04-17 Tom Tromey <tom@tromey.com>
5085 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5087 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5089 * symtab.c (print_symbol_info): Skip printing filename and line
5090 number when `last' is NULL.
5091 (symtab_symbol_info): Use empty string instead of NULL for first
5092 invocation of print_symbol_info.
5093 (rbreak_command): Pass NULL to `last' parameter of
5096 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5098 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5101 2018-04-16 Pedro Alves <palves@redhat.com>
5103 * MAINTAINERS (sh): Remove.
5104 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5105 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5106 (ALLDEPFILES): Remove sh64-tdep.c.
5107 * NEWS: Mentions that support for SH-5/SH64 is removed.
5108 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5109 (sh*-*-openbsd*): Ditto.
5110 (sh64-*-elf*): Remove.
5112 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5113 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5114 * sh-tdep.c: No longer include "sh64-tdep.h".
5115 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5116 * sh64-tdep.c, sh64-tdep.h: Remove files.
5118 2018-04-16 Pedro Alves <palves@redhat.com>
5120 * MAINTAINERS: Remove m88k.
5121 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5122 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5123 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5124 * NEWS: Mention that support for m88k was removed.
5125 * configure.host (m88*-*-*): Remove support.
5126 * configure.nat (m88k-*-*): Remove support.
5127 * configure.tgt (m88*-*-openbsd*): Remove.
5128 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5130 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5132 * configure.tgt (x86_tobjs): New variable.
5133 (amd64_tobjs, i386_tobjs): Use it.
5135 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5137 * symtab.c (print_symbol_info): Precede the symbol definition by
5138 the line number when available.
5139 * NEWS: Advertise this enhancement.
5141 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5143 * NEWS (New options): announce set/show record btrace cpu.
5144 * btrace.c: Include record-btrace.h.
5145 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5146 the vendor is unknown.
5147 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5148 Maybe overwrite the btrace configuration's cpu.
5149 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5150 (btrace_fetch): Add cpu parameter. Update callers.
5151 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5152 Maybe overwrite the btrace configuration's cpu. Skip enabling
5153 errata workarounds if the vendor is unknown.
5154 * python/py-record-btrace.c: Include record-btrace.h.
5155 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5156 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5157 * record-btrace.c (record_btrace_cpu_state_kind): New.
5158 (record_btrace_cpu): New.
5159 (set_record_btrace_cpu_cmdlist): New.
5160 (record_btrace_get_cpu): New.
5161 (require_btrace_thread, record_btrace_info)
5162 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5163 (cmd_set_record_btrace_cpu_none): New.
5164 (cmd_set_record_btrace_cpu_auto): New.
5165 (cmd_set_record_btrace_cpu): New.
5166 (cmd_show_record_btrace_cpu): New.
5167 (_initialize_record_btrace): Initialize set/show record btrace cpu
5169 * record-btrace.h (record_btrace_get_cpu): New.
5171 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5173 * record.c (set_record_command): Fix typo in message.
5175 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5177 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5179 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5181 * infrun.c (process_event_stop_test): Call
5182 gdbarch_in_indirect_branch_thunk.
5183 * gdbarch.sh (in_indirect_branch_thunk): New.
5184 * gdbarch.c: Regenerated.
5185 * gdbarch.h: Regenerated.
5188 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5189 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5190 (ALLDEPFILES): Add x86-tdep.c.
5191 * arch-utils.h (default_in_indirect_branch_thunk): New.
5192 * arch-utils.c (default_in_indirect_branch_thunk): New.
5193 * i386-tdep: Include x86-tdep.h.
5194 (i386_in_indirect_branch_thunk): New.
5195 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5197 * amd64-tdep: Include x86-tdep.h.
5198 (amd64_in_indirect_branch_thunk): New.
5199 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5201 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5204 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5205 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5206 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5209 2018-04-12 Tom Tromey <tom@tromey.com>
5211 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5212 (rust_evaluate_subexp): Likewise.
5214 2018-04-12 Pedro Alves <palves@redhat.com>
5216 * procfs.c (procfs_detach): Make forward declaration's prototype
5217 match definition's protototype.
5218 (proc_get_LDT_entry): Remove stale do_cleanups call.
5220 2018-04-12 Pedro Alves <palves@redhat.com>
5222 * target.h (target_ops::to_has_exited): Delete.
5223 (target_has_exited): Delete.
5224 * target-delegates.c: Regenerate.
5226 2018-04-11 Pedro Alves <palves@redhat.com>
5228 * target.c (fileio_fh_t::t): Add comment.
5229 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5230 (target_fileio_close): Handle a NULL target.
5231 (invalidate_fileio_fh): New.
5232 (target_close): Call it.
5233 * remote.c (remote_hostio_send_command): No longer check whether
5234 remote_desc is open.
5236 2018-04-11 Pedro Alves <palves@redhat.com>
5238 * target.c (fileio_fh_t): Make it a named struct instead of a
5240 (fileio_fh_t::is_closed): New method.
5241 (DEF_VEC_O (fileio_fh_t)): Remove.
5242 (fileio_fhandles): Now a std::vector.
5243 (is_closed_fileio_fh): Delete.
5244 (acquire_fileio_fd): Adjust. Rename parameters.
5245 (release_fileio_fd): Adjust.
5246 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5247 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5248 (target_fileio_close): Adjust.
5250 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5252 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5255 2018-04-10 Pedro Alves <palves@redhat.com>
5257 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5258 (scoped_finish_thread_state): New class.
5259 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5261 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5262 (fetch_inferior_event, normal_stop): Likewise.
5263 * thread.c (finish_thread_state_cleanup): Delete.
5265 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5266 Pedro Alves <palves@redhat.com>
5268 * value.c: Include "selftest.h" and "common/array-view.h".
5269 (struct range) <operator ==>: New.
5270 (test_ranges_contain): New.
5271 (check_ranges_vector): New.
5272 (test_insert_into_bit_range_vector): New.
5273 (_initialize_values): Register selftests.
5274 * common/array-view.h (operator==, operator!=): New.
5276 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5278 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5280 * inline-frame.c: Include <algorithm>.
5281 (struct inline_state): Add constructor.
5282 (inline_state_s): Remove.
5283 (DEF_VEC_O(inline_state_s)): Remove.
5284 (inline_states): Change type to std::vector.
5285 (find_inline_frame_state): Adjust to std::vector.
5286 (allocate_inline_frame_state): Remove.
5287 (clear_inline_frame_state): Adjust to std::vector.
5288 (skip_inline_frames): Adjust to std::vector.
5290 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5292 * tracepoint.h (struct trace_state_variable): Add constructor.
5293 <name>: Change type to std::string.
5294 * tracepoint.c (tsv_s): Remove.
5295 (DEF_VEC_O(tsv_s)): Remove.
5296 (tvariables): Change to std::vector.
5297 (create_trace_state_variable): Adjust to std::vector.
5298 (find_trace_state_variable): Likewise.
5299 (find_trace_state_variable_by_number): Likewise.
5300 (delete_trace_state_variable): Likewise.
5301 (trace_variable_command): Adjust to std::string.
5302 (delete_trace_variable_command): Likewise.
5303 (tvariables_info_1): Adjust to std::vector.
5304 (save_trace_state_variables): Likewise.
5305 (start_tracing): Likewise.
5306 (merge_uploaded_trace_state_variables): Adjust to std::vector
5308 * target.h (struct target_ops)
5309 <to_download_trace_state_variable>: Pass reference to
5310 trace_state_variable.
5311 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
5312 * target-delegates.c: Re-generate.
5313 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
5314 (mi_tsv_deleted): Likewise.
5315 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
5316 * remote.c (remote_download_trace_state_variable): Change
5317 pointer to reference and adjust.
5318 * make-target-delegates (parse_argtypes): Handle references.
5319 (write_function_header): Likewise.
5320 (munge_type): Likewise.
5322 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5324 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5325 string_view-selftests.c.
5326 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
5328 * unittests/basic_string_view/cons/char/1.cc: Likewise.
5329 * unittests/basic_string_view/cons/char/2.cc: Likewise.
5330 * unittests/basic_string_view/cons/char/3.cc: Likewise.
5331 * unittests/basic_string_view/element_access/char/1.cc:
5333 * unittests/basic_string_view/element_access/char/empty.cc:
5335 * unittests/basic_string_view/element_access/char/front_back.cc:
5337 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
5338 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
5340 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
5342 * unittests/basic_string_view/modifiers/swap/char/1.cc:
5344 * unittests/basic_string_view/operations/compare/char/1.cc:
5346 * unittests/basic_string_view/operations/compare/char/13650.cc:
5348 * unittests/basic_string_view/operations/copy/char/1.cc:
5350 * unittests/basic_string_view/operations/data/char/1.cc:
5352 * unittests/basic_string_view/operations/find/char/1.cc:
5354 * unittests/basic_string_view/operations/find/char/2.cc:
5356 * unittests/basic_string_view/operations/find/char/3.cc:
5358 * unittests/basic_string_view/operations/find/char/4.cc:
5360 * unittests/basic_string_view/operations/rfind/char/1.cc:
5362 * unittests/basic_string_view/operations/rfind/char/2.cc:
5364 * unittests/basic_string_view/operations/rfind/char/3.cc:
5366 * unittests/basic_string_view/operations/substr/char/1.cc:
5368 * unittests/basic_string_view/operators/char/2.cc: Likewise.
5369 * unittests/string_view-selftests.c: New file.
5371 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5373 * unittests/basic_string_view/capacity/1.cc: New file.
5374 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
5375 * unittests/basic_string_view/cons/char/1.cc: New file.
5376 * unittests/basic_string_view/cons/char/2.cc: New file.
5377 * unittests/basic_string_view/cons/char/3.cc: New file.
5378 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
5379 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
5380 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
5381 * unittests/basic_string_view/element_access/char/1.cc: New file.
5382 * unittests/basic_string_view/element_access/char/2.cc: New file.
5383 * unittests/basic_string_view/element_access/char/empty.cc: New file.
5384 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
5385 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
5386 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
5387 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
5388 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
5389 * unittests/basic_string_view/include.cc: New file.
5390 * unittests/basic_string_view/inserters/char/1.cc: New file.
5391 * unittests/basic_string_view/inserters/char/2.cc: New file.
5392 * unittests/basic_string_view/inserters/char/3.cc: New file.
5393 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
5394 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
5395 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
5396 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
5397 * unittests/basic_string_view/literals/types.cc: New file.
5398 * unittests/basic_string_view/literals/values.cc: New file.
5399 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
5400 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
5401 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
5402 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
5403 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
5404 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
5405 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
5406 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
5407 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
5408 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
5409 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
5410 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
5411 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
5412 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
5413 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
5414 * unittests/basic_string_view/operations/data/char/1.cc: New file.
5415 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
5416 * unittests/basic_string_view/operations/find/char/1.cc: New file.
5417 * unittests/basic_string_view/operations/find/char/2.cc: New file.
5418 * unittests/basic_string_view/operations/find/char/3.cc: New file.
5419 * unittests/basic_string_view/operations/find/char/4.cc: New file.
5420 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
5421 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
5422 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
5423 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
5424 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
5425 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
5426 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
5427 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
5428 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
5429 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
5430 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
5431 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
5432 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
5433 * unittests/basic_string_view/operators/char/2.cc: New file.
5434 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
5435 * unittests/basic_string_view/range_access/char/1.cc: New file.
5436 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
5437 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
5438 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
5439 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
5440 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
5441 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
5442 * unittests/basic_string_view/requirements/typedefs.cc: New file.
5443 * unittests/basic_string_view/typedefs.cc: New file.
5444 * unittests/basic_string_view/types/1.cc: New file.
5446 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5448 * common/gdb_string_view.h: Remove libstdc++ implementation
5449 details, adjust to gdb reality.
5450 * common/gdb_string_view.tcc: Likewise.
5451 * cli/cli-script.c (struct string_view): Remove.
5452 (user_args) <m_args>: Change element type to gdb::string_view.
5453 (user_args::insert_args): Adjust.
5455 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5457 * common/gdb_string_view.h: New file.
5458 * common/gdb_string_view.tcc: New file.
5460 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5462 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
5463 * configure: Re-generate.
5465 2018-04-09 Pedro Alves <palves@redhat.com>
5467 * gdbarch.sh: Include "observable.h" instead of "observer.h".
5468 (set_target_gdbarch): Call
5469 gdb::observers::architecture_changed.notify instead of
5470 observer_notify_architecture_changed.
5472 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5474 * tracepoint.c (struct current_traceframe_cleanup): Remove.
5475 (do_restore_current_traceframe_cleanup): Remove.
5476 (restore_current_traceframe_cleanup_dtor): Remove.
5477 (make_cleanup_restore_current_traceframe): Remove.
5478 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
5480 * tracepoint.h (struct scoped_restore_current_traceframe): New.
5481 * infrun.c (fetch_inferior_event): Use
5482 scoped_restore_current_traceframe.
5484 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5486 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
5488 <n_allocated_type_units>: Remove.
5489 <all_type_units>: Change to std::vector.
5490 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5491 to std::vector change.
5492 (dwarf2_per_objfile::get_cutu): Likewise.
5493 (dwarf2_per_objfile::get_tu): Likewise.
5494 (create_signatured_type_table_from_index): Likewise.
5495 (create_signatured_type_table_from_debug_names): Likewise.
5496 (dw2_symtab_iter_next): Likewise.
5497 (dw2_print_stats): Likewise.
5498 (dw2_expand_all_symtabs): Likewise.
5499 (dw2_expand_marked_cus): Likewise.
5500 (dw2_debug_names_iterator::next): Likewise.
5501 (dwarf2_initialize_objfile): Likewise.
5502 (add_signatured_type_cu_to_table): Likewise.
5503 (create_all_type_units): Likewise.
5504 (add_type_unit): Likewise.
5505 (struct tu_abbrev_offset): Add constructor.
5506 (build_type_psymtabs_1): Adjust to std::vector change.
5507 (print_tu_stats): Likewise.
5508 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5509 (write_debug_names): Likewise.
5511 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5513 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
5514 Make an std::vector.
5515 <n_comp_units>: Remove.
5516 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
5517 to std::vector change.
5518 (dwarf2_per_objfile::get_cutu): Likewise.
5519 (dwarf2_per_objfile::get_cu): Likewise.
5520 (create_cus_from_index): Likewise.
5521 (create_addrmap_from_index): Likewise.
5522 (create_addrmap_from_aranges): Likewise.
5523 (dwarf2_read_index): Likewise.
5524 (dw2_find_last_source_symtab): Likewise.
5525 (dw2_map_symtabs_matching_filename): Likewise.
5526 (dw2_symtab_iter_next): Likewise.
5527 (dw2_print_stats): Likewise.
5528 (dw2_expand_all_symtabs): Likewise.
5529 (dw2_expand_symtabs_with_fullname): Likewise.
5530 (dw2_expand_marked_cus): Likewise.
5531 (dw2_map_symbol_filenames): Likewise.
5532 (create_cus_from_debug_names): Likewise.
5533 (dwarf2_read_debug_names): Likewise.
5534 (dw2_debug_names_iterator::next): Likewise.
5535 (dwarf2_initialize_objfile): Likewise.
5536 (set_partial_user): Likewise.
5537 (dwarf2_build_psymtabs_hard): Likewise.
5538 (read_comp_units_from_section): Remove arguments, adjust to
5540 (create_all_comp_units): Adjust to std::vector and
5541 read_comp_units_from_section changes.
5542 (dwarf2_find_containing_comp_unit): Adjust to std::vector
5544 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
5545 (psyms_seen_size): Likewise.
5546 (write_gdbindex): Likewise.
5547 (write_debug_names): Likewise.
5549 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5551 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
5552 with dwarf2_per_objfile.
5553 (create_cus_from_index): Likewise.
5554 (create_signatured_type_table_from_index): Likewise.
5555 (dwarf2_read_index): Likewise.
5556 (dwarf2_initialize_objfile): Likewise.
5557 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
5558 per_cu rather than get_dwarf2_per_objfile.
5560 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5562 * dwarf2read.h (struct signatured_type): Forward declare.
5563 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
5565 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
5566 (dw2_get_cutu): ...this.
5567 (dwarf2_per_objfile::get_cu): Rename from...
5568 (dw2_get_cu): ...this.
5569 (dwarf2_per_objfile::get_tu): New.
5570 (create_addrmap_from_index): Adjust.
5571 (create_addrmap_from_aranges): Adjust.
5572 (dw2_find_last_source_symtab): Adjust.
5573 (dw2_map_symtabs_matching_filename): Adjust.
5574 (dw2_symtab_iter_next): Adjust.
5575 (dw2_print_stats): Adjust.
5576 (dw2_expand_all_symtabs): Adjust.
5577 (dw2_expand_symtabs_with_fullname): Adjust.
5578 (dw2_expand_marked_cus): Adjust.
5579 (dw_expand_symtabs_matching_file_matcher): Adjust.
5580 (dw2_map_symbol_filenames): Adjust.
5581 (dw2_debug_names_iterator::next): Adjust.
5582 (dwarf2_initialize_objfile): Adjust.
5583 (set_partial_user): Adjust.
5584 (dwarf2_build_psymtabs_hard): Adjust.
5586 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5588 * dwarf2read.c (create_signatured_type_table_from_debug_names):
5589 Remove unused variables.
5590 (dw2_map_symtabs_matching_filename): Likewise.
5591 (dwarf2_record_block_ranges): Likewise.
5592 (dwarf2_read_addr_index): Likewise.
5593 (follow_die_offset): Likewise.
5595 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5597 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
5598 to symbol_file_add_main.
5600 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5603 * mi/mi-console.c (do_fputc_async_safe): New.
5604 (mi_console_file::write_async_safe): New.
5605 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
5606 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
5608 * ui-file.c (ui_file::putstrn): Adjust call to
5609 fputstrn_unfiltered.
5610 * utils.c (printchar): Replace do_fputs and do_fprintf
5611 parameters by do_fputc.
5612 (fputstr_filtered): Adjust call to printchar.
5613 (fputstr_unfiltered): Likewise.
5614 (fputstrn_filtered): Likewise.
5615 (fputstrn_unfiltered): Add do_fputc parameter, pass to
5617 * utils.h (do_fputc_ftype): New typedef.
5618 (fputstrn_unfiltered): Add do_fputc parameter.
5620 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5622 * regformats/i386/i386-avx.dat: Remove.
5624 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5627 * amd64-tdep.c (amd64_none_init_abi): New function.
5628 (amd64_x32_none_init_abi): New function.
5629 (_initialize_amd64_tdep): Register handlers for x86-64 and
5630 x64_32 with GDB_OSABI_NONE.
5631 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5632 GDB_OSABI_NONE osabi.
5634 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5637 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5639 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5640 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5642 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5644 * common/byte-vector.h (char_vector): New type.
5645 * target.h (target_read_alloc): Return
5646 gdb::optional<byte_vector>.
5647 (target_read_stralloc): Return gdb::optional<char_vector>.
5648 (target_get_osdata): Return gdb::optional<char_vector>.
5649 * target.c (target_read_alloc_1): Templatize. Replacement
5650 manual memory management with vector.
5651 (target_read_alloc): Change return type, adjust.
5652 (target_read_stralloc): Change return type, adjust.
5653 (target_get_osdata): Change return type, adjust.
5654 * auxv.c (struct auxv_info) <length>: Remove.
5655 <data>: Change type to gdb::optional<byte_vector>.
5656 (auxv_inferior_data_cleanup): Free auxv_info with delete.
5657 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5658 (target_auxv_search): Adjust.
5659 (fprint_target_auxv): Adjust.
5660 * avr-tdep.c (avr_io_reg_read_command): Adjust.
5661 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5662 (linux_make_corefile_notes): Adjust.
5663 * osdata.c (get_osdata): Adjust.
5664 * remote.c (remote_get_threads_with_qxfer): Adjust.
5665 (remote_memory_map): Adjust.
5666 (remote_traceframe_info): Adjust.
5667 (btrace_read_config): Adjust.
5668 (remote_read_btrace): Adjust.
5669 (remote_pid_to_exec_file): Adjust.
5670 * solib-aix.c (solib_aix_get_library_list): Adjust.
5671 * solib-dsbt.c (decode_loadmap): Don't free buf.
5672 (dsbt_get_initial_loadmaps): Adjust.
5673 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5674 * solib-target.c (solib_target_current_sos): Adjust.
5675 * tracepoint.c (sdata_make_value): Adjust.
5676 * xml-support.c (xinclude_start_include): Adjust.
5677 (xml_fetch_content_from_file): Adjust.
5678 * xml-support.h (xml_fetch_another): Change return type.
5679 (xml_fetch_content_from_file): Change return type.
5680 * xml-syscall.c (xml_init_syscalls_info): Adjust.
5681 * xml-tdesc.c (file_read_description_xml): Adjust.
5682 (fetch_available_features_from_target): Change return type.
5683 (target_fetch_description_xml): Adjust.
5684 (target_read_description_xml): Adjust.
5686 2018-04-06 Tom Tromey <tom@tromey.com>
5688 * value.c (~value): Update.
5689 (struct value) <contents>: Now unique_xmalloc_ptr.
5690 (value_contents_bits_eq, allocate_value_contents)
5691 (value_contents_raw, value_contents_all_raw)
5692 (value_contents_for_printing, value_contents_for_printing_const)
5693 (set_value_enclosing_type): Update.
5695 2018-04-06 Tom Tromey <tom@tromey.com>
5697 * value.c (range_s): Remove typedef, VEC.
5698 (struct range): Add operator<.
5699 (range_lessthan): Remove.
5700 (ranges_contain): Change type.
5702 (struct value) <unavailable, optimized_out>: Now std::vector.
5703 (value_entirely_available)
5704 (value_entirely_covered_by_range_vector)
5705 (value_entirely_unavailable, value_entirely_optimized_out):
5707 (insert_into_bit_range_vector): Change argument type.
5708 (find_first_range_overlap): Likewise.
5709 (struct ranges_and_idx, value_contents_bits_eq)
5710 (require_not_optimized_out, require_available): Update.
5711 (ranges_copy_adjusted): Change argument types.
5712 (value_optimized_out, value_copy, value_fetch_lazy): Update.
5714 2018-04-06 Tom Tromey <tom@tromey.com>
5716 * value.c (~value): Update.
5717 (struct value) <parent>: Now a value_ref_ptr.
5718 (value_parent, set_value_parent, value_address, value_copy):
5721 2018-04-06 Tom Tromey <tom@tromey.com>
5723 * value.c (struct value): Add constructor, destructor, and member
5725 (allocate_value_lazy, value_decref): Update.
5727 2018-04-06 Tom Tromey <tom@tromey.com>
5729 * value.c (struct value) <released, next>: Remove.
5730 (all_values): Now a std::vector.
5731 (allocate_value_lazy): Update.
5732 (value_next): Remove.
5733 (value_mark, value_free_to_mark, release_value)
5734 (value_release_to_mark): Update.
5736 2018-04-06 Tom Tromey <tom@tromey.com>
5738 * value.h (fetch_subexp_value, value_release_to_mark): Update.
5739 (free_value_chain): Remove.
5740 * value.c (free_value_chain): Remove.
5741 (value_release_to_mark): Return a std::vector.
5742 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5744 (check_condition): Update.
5745 * eval.c (fetch_subexp_value): Change "val_chain" to a
5747 * breakpoint.c (update_watchpoint): Update.
5748 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5750 2018-04-06 Tom Tromey <tom@tromey.com>
5752 * value.h (free_all_values): Remove.
5753 * value.c (free_all_values): Remove.
5755 2018-04-06 Tom Tromey <tom@tromey.com>
5757 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5758 (value_history_chain, value_history_count): Remove.
5759 (value_history): New global.
5760 (record_latest_value, access_value_history, show_values)
5761 (preserve_values): Update.
5763 2018-04-06 Tom Tromey <tom@tromey.com>
5765 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5766 * varobj.c (varobj_set_display_format, varobj_set_value)
5767 (install_default_visualizer, construct_visualizer)
5768 (install_new_value, ~varobj, varobj_get_value_type)
5769 (my_value_of_variable, varobj_editable_p): Update.
5770 * c-varobj.c (c_describe_child, c_value_of_variable)
5771 (cplus_number_of_children, cplus_describe_child): Update.
5772 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5773 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5774 (ada_value_of_variable, ada_value_is_changeable_p): Update.
5776 2018-04-06 Tom Tromey <tom@tromey.com>
5778 * printcmd.c (last_examine_address): Change type to
5780 (do_examine, x_command): Update.
5782 2018-04-06 Tom Tromey <tom@tromey.com>
5784 * value.c (release_value): Update.
5785 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5786 (struct bpstats) <val>: Now a value_ref_ptr.
5787 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5788 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5789 (~watchpoint, print_it_watchpoint, watch_command_1)
5790 (invalidate_bp_value_on_memory_change): Update.
5792 2018-04-06 Tom Tromey <tom@tromey.com>
5794 * varobj.c (varobj_clear_saved_item)
5795 (update_dynamic_varobj_children, install_new_value, ~varobj):
5797 * value.h (value_incref): Move declaration earlier.
5798 (value_decref): Rename from value_free.
5799 (struct value_ref_policy): New.
5800 (value_ref_ptr): New typedef.
5801 (struct value_deleter): Remove.
5802 (gdb_value_up): Remove typedef.
5803 (release_value): Change return type.
5804 (release_value_or_incref): Remove.
5805 * value.c (set_value_parent): Update.
5806 (value_incref): Change return type.
5807 (value_decref): Rename from value_free.
5808 (value_free_to_mark, free_all_values, free_value_chain): Update.
5809 (release_value): Return value_ref_ptr.
5810 (release_value_or_incref): Remove.
5811 (record_latest_value, set_internalvar, clear_internalvar):
5813 * stack.c (info_frame_command): Don't call value_free.
5814 * python/py-value.c (valpy_dealloc, valpy_new)
5815 (value_to_value_object): Update.
5816 * printcmd.c (do_examine): Update.
5817 * opencl-lang.c (lval_func_free_closure): Update.
5818 * mi/mi-main.c (register_changed_p): Don't call value_free.
5819 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5820 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5821 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5823 * guile/scm-value.c (vlscm_free_value_smob)
5824 (vlscm_scm_from_value): Update.
5825 * frame.c (frame_register_unwind, frame_unwind_register_signed)
5826 (frame_unwind_register_unsigned, get_frame_register_bytes)
5827 (put_frame_register_bytes): Don't call value_free.
5828 * findvar.c (address_from_register): Don't call value_free.
5829 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5830 * dwarf2loc.c (entry_data_value_free_closure)
5831 (value_of_dwarf_reg_entry, free_pieced_value_closure)
5832 (dwarf2_evaluate_loc_desc_full): Update.
5833 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5834 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5835 (~watchpoint, watch_command_1)
5836 (invalidate_bp_value_on_memory_change): Update.
5837 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5839 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
5842 * warning.m4: Add -Wno-error=deprecated-register.
5843 * configure: Re-generate.
5845 2018-04-05 Tom Tromey <tom@tromey.com>
5847 * linespec.h: Remove include of "vec.h".
5849 2018-04-05 Tom Tromey <tom@tromey.com>
5851 * linespec.c (typep): Remove typedef.
5852 (find_methods, find_superclass_methods): Take a std::vector.
5853 (find_method): Use std::vector.
5855 2018-04-05 Tom Tromey <tom@tromey.com>
5857 * utils.c (compare_strings): Remove.
5858 * utils.h (compare_strings): Remove.
5859 * objc-lang.h (find_imps): Update.
5860 * objc-lang.c (find_methods): Take a std::vector.
5861 (uniquify_strings, find_imps): Likewise.
5862 * linespec.c (find_methods): Take a std::vector.
5863 (decode_objc): Use std::vector.
5864 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5866 (find_method, find_function_symbols): Use std::vector.
5868 2018-04-05 Tom Tromey <tom@tromey.com>
5870 * completer.c (completion_tracker::completion_tracker): Remove
5872 (completion_tracker::discard_completions): Likewise.
5873 * breakpoint.c (ambiguous_names_p): Remove cast.
5874 * ada-lang.c (_initialize_ada_language): Remove cast.
5875 * utils.h (streq): Update.
5876 (streq_hash): Add new declaration.
5877 * utils.c (streq): Return bool.
5878 (streq_hash): New function.
5880 2018-04-05 Tom Tromey <tom@tromey.com>
5882 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5883 Remove a string copy.
5885 2018-04-05 Tom Tromey <tom@tromey.com>
5887 * linespec.c (filter_results): Use std::vector.
5888 (decode_line_2, decode_line_full): Update.
5890 2018-04-05 Tom Tromey <tom@tromey.com>
5892 * linespec.c (canonical_to_fullform): Return std::string.
5893 (filter_results): Update.
5894 (struct decode_line_2_item): Add constructor.
5895 <fullform, displayform>: Now std::string.
5896 (decode_line_2_compare_items): Now a std::sort comparator.
5897 (decode_line_2): Update.
5899 2018-04-05 Tom Tromey <tom@tromey.com>
5901 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5902 (unexpected_linespec_error): Update.
5903 (linespec_parse_basic, parse_linespec): Update.
5905 2018-04-05 Tom Tromey <tom@tromey.com>
5907 * linespec.c (linespec_parse_basic): Reindent.
5909 2018-04-05 Tom Tromey <tom@tromey.com>
5911 * minsyms.h (iterate_over_minimal_symbols): Update.
5912 * minsyms.c (iterate_over_minimal_symbols): Take a
5914 * linespec.c (struct collect_minsyms): Remove.
5915 (compare_msyms): Now a std::sort comparator.
5916 (add_minsym): Add parameters.
5917 (search_minsyms_for_name): Update. Use std::vector.
5919 2018-04-03 Tom Tromey <tom@tromey.com>
5921 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5924 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5926 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5928 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5931 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5932 printing static type.
5934 2018-04-01 Tom Tromey <tom@tromey.com>
5936 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5937 (rs6000_xfer_shared_libraries): Update.
5939 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5941 * common/gdb_vecs.h (char_ptr): Remove.
5942 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5944 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5946 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5948 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5950 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5952 * tracepoint.h (struct uploaded_tp): Initialize fields.
5953 <actions, step_actions, cmd_strings>: Change type to
5954 std::vector<char *>.
5955 * tracepoint.c (get_uploaded_tp): Allocate with new.
5956 (free_uploaded_tps): Free with delete.
5957 (parse_tracepoint_definition): Adjust to std::vector change.
5958 * breakpoint.c (read_uploaded_action): Likewise.
5959 (create_tracepoint_from_upload): Likewise.
5960 * ctf.c (ctf_write_uploaded_tp): Likewise.
5961 (SET_ARRAY_FIELD): Likewise.
5962 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5964 2018-03-30 Tom Tromey <tom@tromey.com>
5966 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
5968 (svr4_keep_data_in_core): Update.
5969 (svr4_read_so_list): Update.
5971 2018-03-30 Tom Tromey <tom@tromey.com>
5973 * windows-nat.c (handle_output_debug_string, handle_exception):
5975 * target.h (target_read_string): Update.
5976 * target.c (target_read_string): Change "string" to
5978 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5980 * solib-frv.c (frv_current_sos): Update.
5981 * solib-dsbt.c (dsbt_current_sos): Update.
5982 * solib-darwin.c (darwin_current_sos): Update.
5983 * linux-thread-db.c (inferior_has_bug): Update.
5984 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5985 Update. Remove alloca.
5986 * ada-lang.c (ada_main_name): Update.
5988 2018-03-30 Tom Tromey <tom@tromey.com>
5990 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5991 (struct dwo_file_deleter): New.
5992 (dwo_file_up): New typedef.
5993 (open_and_init_dwo_file): Use dwo_file_up.
5994 (free_dwo_file_cleanup): Remove.
5996 2018-03-30 Tom Tromey <tom@tromey.com>
5998 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5999 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6001 2018-03-30 Tom Tromey <tom@tromey.com>
6003 * dwarf2read.c (class free_cached_comp_units): New class.
6004 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6005 (free_cached_comp_units): Remove function.
6007 2018-03-30 Tom Tromey <tom@tromey.com>
6009 * utils.h (make_cleanup_unpush_target): Remove.
6010 * inf-ptrace.c (struct target_unpusher): New.
6011 (target_unpush_up) New typedef.
6012 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6014 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6016 2018-03-27 Tom Tromey <tom@tromey.com>
6018 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6020 2018-03-27 Pedro Alves <palves@redhat.com>
6021 Tom Tromey <tom@tromey.com>
6023 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6024 destructor. Now a class.
6025 (gdb_readline_wrapper_cleanup): Remove function.
6026 (gdb_readline_wrapper): Remove cleanups.
6028 2018-03-27 Tom Tromey <tom@tromey.com>
6030 * typeprint.h (struct type_print_options) <local_typedefs,
6031 global_typedefs>: Remove "struct" keyword.
6032 (class typedef_hash_table): New class.
6033 (recursively_update_typedef_hash, add_template_parameters)
6034 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6035 (find_typedef_in_hash): Don't declare.
6036 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6037 (typedef_hash_table::recursively_update): Rename from
6038 recursively_update_typedef_hash. Now a member.
6039 (typedef_hash_table::add_template_parameters): Rename from
6040 add_template_parameters. Now a member.
6041 (typedef_hash_table::typedef_hash_table): Now a constructor;
6042 rename from create_typedef_hash.
6043 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6044 rename from free_typedef_hash.
6045 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6046 (do_free_global_table): Remove.
6047 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6048 from copy_type_recursive.
6049 (create_global_typedef_table): Remove.
6050 (typedef_hash_table::find_global_typedef): Now a member of
6052 (typedef_hash_table::find_typedef): Rename from
6053 find_typedef_in_hash; now a member.
6054 (whatis_exp): Update.
6055 * extension.h (struct ext_lang_type_printers): Add constructor and
6057 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6059 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6060 Now a constructor; rename from start_ext_lang_type_printers.
6061 (ext_lang_type_printers): Now a destructor; rename from
6062 free_ext_lang_type_printers.
6063 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6065 (c_type_print_base_struct_union): Update. Remove cleanups.
6067 2018-03-27 Tom Tromey <tom@tromey.com>
6069 * dwarf-index-write.c: Include <cmath>.
6071 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6073 * NEWS: Add entry describing new "set|show varsize-limit" command.
6074 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6076 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6079 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6081 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6083 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6084 * dwarf-index-common.c: New file.
6085 * dwarf-index-common.h: New file.
6086 * dwarf-index-write.c: New file.
6087 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6088 (struct dwarf2_section_info): Move from here.
6089 (dwarf2_section_info_def): Likewise.
6090 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6091 (offset_type): Likewise.
6092 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6093 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6094 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6095 (byte_swap): Likewise.
6096 (MAYBE_SWAP): Likewise.
6097 (dwarf2_per_cu_ptr): Likewise.
6098 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6099 (struct tu_stats): Likewise.
6100 (struct dwarf2_per_objfile): Likewise.
6101 (struct dwarf2_per_cu_data): Likewise.
6102 (struct signatured_type): Likewise.
6103 (sig_type_ptr): Likewise.
6104 (DEF_VEC_P (sig_type_ptr)): Likewise.
6105 (INDEX4_SUFFIX): Likewise.
6106 (INDEX5_SUFFIX): Likewise.
6107 (DEBUG_STR_SUFFIX): Likewise.
6108 (dwarf2_read_section): Make non-static.
6109 (mapped_index_string_hash): Move from here.
6110 (dwarf5_djb_hash): Likewise.
6111 (file_write): Likewise.
6112 (class data_buf): Likewise.
6113 (struct symtab_index_entry): Likewise.
6114 (struct mapped_symtab): Likewise.
6115 (find_slot): Likewise.
6116 (hash_expand): Likewise.
6117 (add_index_entry): Likewise.
6118 (uniquify_cu_indices): Likewise.
6119 (class c_str_view): Likewise.
6120 (class c_str_view_hasher): Likewise.
6121 (class vector_hasher): Likewise.
6122 (write_hash_table): Likewise.
6123 (psym_index_map): Likewise.
6124 (struct addrmap_index_data): Likewise.
6125 (add_address_entry): Likewise.
6126 (add_address_entry_worker): Likewise.
6127 (write_address_map): Likewise.
6128 (symbol_kind): Likewise.
6129 (write_psymbols): Likewise.
6130 (struct signatured_type_index_data): Likewise.
6131 (write_one_signatured_type): Likewise.
6132 (recursively_count_psymbols): Likewise.
6133 (recursively_write_psymbols): Likewise.
6134 (class debug_names): Likewise.
6135 (check_dwarf64_offsets): Likewise.
6136 (psyms_seen_size): Likewise.
6137 (write_gdbindex): Likewise.
6138 (write_debug_names): Likewise.
6139 (assert_file_size): Likewise.
6140 (write_psymtabs_to_index): Likewise.
6141 (save_gdb_index_command): Likewise.
6142 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6144 * dwarf2read.h: New file.
6146 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6149 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6150 symbol name if the CU's language stores symbol names in linkage
6152 * language.h (struct language_defn)
6153 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6154 all instances of this struct.
6156 2018-03-26 Tom Tromey <tom@tromey.com>
6158 * stack.c (backtrace_command_1): Remove verbose code.
6160 2018-03-26 Tom Tromey <tom@tromey.com>
6162 * python/py-framefilter.c (py_print_type): Don't catch
6163 exceptions. Return void.
6164 (py_print_value): Likewise.
6165 (py_print_single_arg): Likewise.
6166 (enumerate_args): Don't catch exceptions.
6167 (py_print_args): Likewise.
6168 (py_print_frame): Likewise.
6169 (gdbpy_apply_frame_filter): Catch exceptions here.
6171 2018-03-26 Tom Tromey <tom@tromey.com>
6173 * stack.c (_initialize_stack): Remove trailing newlines from help
6174 text. Add "Usage" line to "backtrace" help.
6176 2018-03-26 Tom Tromey <tom@tromey.com>
6179 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6181 2018-03-26 Tom Tromey <tom@tromey.com>
6183 * python/py-framefilter.c (py_print_single_arg): Return
6184 EXT_LANG_BT_ERROR from catch.
6186 2018-03-26 Tom Tromey <tom@tromey.com>
6189 * stack.c (backtrace_command_1): Move some code into no-filters
6192 2018-03-26 Tom Tromey <tom@tromey.com>
6194 * python/py-framefilter.c (throw_quit_or_print_exception): New
6196 (gdbpy_apply_frame_filter): Use it.
6198 2018-03-26 Tom Tromey <tom@tromey.com>
6201 * python/py-framefilter.c (py_print_type, py_print_value)
6202 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6205 2018-03-26 Tom Tromey <tom@tromey.com>
6207 * python/py-framefilter.c (enumerate_args): Use
6208 gdb::unique_xmalloc_ptr.
6210 2018-03-26 Tom Tromey <tom@tromey.com>
6212 * python/py-framefilter.c (py_print_frame): Return
6214 (gdbpy_apply_frame_filter): Update comment.
6215 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6217 <EXT_LANG_BT_NO_FILTERS>: Change value.
6219 2018-03-26 Tom Tromey <tom@tromey.com>
6222 * stack.c (backtrace_command): Parse "hide" argument.
6223 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6224 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6227 2018-03-26 Tom Tromey <tom@tromey.com>
6229 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6231 (backtrace_command): Remove "fulltrace", add "flags".
6233 2018-03-26 Tom Tromey <tom@tromey.com>
6235 * stack.c (backtrace_command): Rewrite command line parsing.
6237 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6239 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6241 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6243 * filename-seen-cache.h: Add include guard.
6245 2018-03-26 Keith Seitz <keiths@redhat.com>
6247 * symfile.c (place_section): Remove "struct" from section_addr_info
6249 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6250 "struct" keyword from section_addr_info.
6252 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6254 * regformats/regdef.h (reg): Add constructors.
6256 2018-03-25 Pedro Alves <palves@redhat.com>
6258 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6259 if then/else bodies in var_func_name extraction.
6261 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6263 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6264 lookup_minimal_symbol() to find symbol entry.
6265 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6267 2018-03-23 Keith Seitz <keiths@redhat.com>
6270 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6271 nested type definitions for C++, too.
6273 2018-03-23 Tom Tromey <tom@tromey.com>
6275 * machoread.c (struct oso_el): Add a constructor. Don't define as
6277 (macho_register_oso): Remove.
6278 (macho_symtab_read): Take a std::vector.
6279 (oso_el_compare_name): Now a std::sort comparator.
6280 (macho_symfile_read_all_oso): Take a std::vector.
6281 (macho_symfile_read): Use std::vector. Remove cleanups.
6283 2018-03-22 Tom Tromey <tom@tromey.com>
6285 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6286 (record_full_goto_bookmark): Use std::string.
6288 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6291 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6294 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6296 * rs6000-tdep.c (store_insn_p): New function.
6297 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6298 and cr_reg to their unshifted values. Use store_insn_p to
6299 match LR saves using either R1 or fdata->alloca_reg. Use
6300 store_insn_p to match CR saves. Set alloca_reg_offset
6301 when alloca_reg and framep are set. Remove lr_reg shift
6302 when assigning to fdata->lr_register.
6304 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6306 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
6307 command line args instead of emitting a warning.
6309 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6311 * tracepoint.h (struct static_tracepoint_marker): Initialize
6312 fields, define default constructor, move constructor and move
6313 assignment, disable the rest.
6314 <str_id, extra>: Make std::string.
6315 (release_static_tracepoint_marker): Remove.
6316 (free_current_marker): Remove.
6317 * tracepoint.c (free_current_marker): Remove.
6318 (parse_static_tracepoint_marker_definition): Adjust to
6319 std::string, use new hex2str overload.
6320 (release_static_tracepoint_marker): Remove.
6321 (print_one_static_tracepoint_marker): Get marker by reference
6322 and adjust to std::string.
6323 (info_static_tracepoint_markers_command): Adjust to std::vector
6325 * target.h (static_tracepoint_marker_p): Remove typedef.
6326 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
6327 (struct target_ops) <to_static_tracepoint_marker_at>: Return
6329 <to_static_tracepoint_markers_by_strid>: Return std::vector.
6331 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
6332 (target_debug_print_std_vector_static_tracepoint_marker): New.
6333 (target_debug_print_struct_static_tracepoint_marker_p): Rename
6335 (target_debug_print_static_tracepoint_marker_p): ... this.
6336 * target-delegates.c: Re-generate.
6337 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
6339 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
6340 (decode_static_tracepoint_spec): Adjust to std::vector.
6341 (tracepoint_print_one_detail): Adjust to std::string.
6342 (strace_marker_decode_location): Adjust to std::string.
6343 (update_static_tracepoint): Adjust to std::string, remove call
6344 to release_static_tracepoint_marker.
6345 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6346 Adjust to std::vector.
6347 * remote.c (remote_static_tracepoint_marker_at): Return bool.
6348 (remote_static_tracepoint_markers_by_strid): Adjust to
6350 * common/rsp-low.h (hex2str): New overload with explicit count
6352 * common/rsp-low.c (hex2str): New overload with explicit count
6354 * unittests/rsp-low-selftests.c (test_hex2str): New function.
6355 (_initialize_rsp_low_selftests): Add test_hex2str test.
6356 * unittests/tracepoint-selftests.c
6357 (test_parse_static_tracepoint_marker_definition): Adjust to
6360 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6362 * tracepoint.c (parse_static_tracepoint_marker_definition):
6363 Consider case where the definition is followed by more
6365 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6366 tracepoint-selftests.c.
6367 * unittests/tracepoint-selftests.c: New.
6369 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6371 * MAINTAINERS (Write After Approval): Add Pedro Franco de
6374 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6376 * symtab.c (find_pc_sect_line): fixed indentation.
6378 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
6380 * symtab.c (find_pc_sect_line): now uses binary search.
6382 2018-03-19 Tom Tromey <tom@tromey.com>
6384 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
6387 2018-03-19 Pedro Alves <palves@redhat.com>
6388 Tom Tromey <tom@tromey.com>
6390 * unittests/observable-selftests.c: New file.
6391 * common/observable.h: New file.
6392 * observable.h: New file.
6393 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
6394 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
6395 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
6396 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
6397 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
6398 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
6399 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
6400 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
6401 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
6402 python/py-breakpoint.c, python/py-finishbreakpoint.c,
6403 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
6404 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
6405 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
6406 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
6407 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
6408 tui/tui-interp.c, valops.c: Update all users.
6409 * tui/tui-hooks.c (tui_bp_created_observer)
6410 (tui_bp_deleted_observer, tui_bp_modified_observer)
6411 (tui_inferior_exit_observer, tui_before_prompt_observer)
6412 (tui_normal_stop_observer, tui_register_changed_observer):
6414 (tui_observers_token): New global.
6415 (attach_or_detach, tui_attach_detach_observers): New functions.
6416 (tui_install_hooks, tui_remove_hooks): Use
6417 tui_attach_detach_observers.
6418 * record-btrace.c (record_btrace_thread_observer): Remove.
6419 (record_btrace_thread_observer_token): New global.
6420 * observer.sh: Remove.
6421 * observer.c: Rename to observable.c.
6422 * observable.c (namespace gdb_observers): Define new objects.
6423 (observer_debug): Move into gdb_observers namespace.
6424 (struct observer, struct observer_list, xalloc_observer_list_node)
6425 (xfree_observer_list_node, generic_observer_attach)
6426 (generic_observer_detach, generic_observer_notify): Remove.
6427 (_initialize_observer): Update.
6428 Don't include observer.inc.
6429 * Makefile.in (generated_files): Remove observer.h, observer.inc.
6430 (clean mostlyclean): Likewise.
6431 (observer.h, observer.inc): Remove targets.
6432 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
6433 (COMMON_SFILES): Use observable.c, not observer.c.
6434 * .gitignore: Remove observer.h.
6436 2018-03-18 Tom Tromey <tom@tromey.com>
6438 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
6440 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
6442 2018-03-17 Tom Tromey <tom@tromey.com>
6444 * auto-load.c (auto_load_objfile_script_1): Use std::string.
6446 2018-03-17 Tom Tromey <tom@tromey.com>
6448 * target.c (class scoped_target_fd): New.
6449 (target_fileio_close_cleanup): Remove.
6450 (target_fileio_read_alloc_1): Use scoped_target_fd.
6452 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6454 * silent-rules.mk: New.
6455 * Makefile.in: Include silent-rules.mk
6456 (srcdir, VPATH, top_srcdir): Move up.
6457 (COMPILE): Add ECHO_CXX.
6458 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
6459 (init.c): Add ECHO_INIT_C.
6460 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6461 (version.c): Add ECHO_GEN.
6462 (printcmd.o): Add ECHO_CXX.
6463 (target-float.o): Add ECHO_CXX.
6464 (ada-exp.o): Add ECHO_CXX.
6465 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
6466 (insight$(EXEEXT)): Add ECHO_CXXLD.
6467 * gnulib/configure.ac: Add AM_SILENT_RULES.
6468 * gnulib/aclocal.m4: Re-generate.
6469 * gnulib/configure: Re-generate.
6470 * gnulib/import/Makefile.in: Re-generate.
6472 2018-03-16 Tom Tromey <tom@tromey.com>
6474 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
6475 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
6476 * utils.c (do_free_section_addr_info)
6477 (make_cleanup_free_section_addr_info): Remove.
6478 * symfile.h (struct other_sections): Add constructor.
6479 (struct section_addr_info): Remove.
6480 (section_addr_info): New typedef.
6481 (struct sym_fns) <sym_offsets>: Change type of parameter.
6482 (build_section_addr_info_from_objfile)
6483 (relative_addr_info_to_section_offsets, addr_info_make_relative)
6484 (default_symfile_offsets, symbol_file_add)
6485 (symbol_file_add_from_bfd)
6486 (build_section_addr_info_from_section_table): Update.
6487 (alloc_section_addr_info, free_section_addr_info): Don't declare.
6488 * symfile.c (alloc_section_addr_info): Remove.
6489 (build_section_addr_info_from_section_table): Change return type.
6491 (build_section_addr_info_from_bfd)
6492 (build_section_addr_info_from_objfile): Likewise.
6493 (free_section_addr_info): Remove.
6494 (relative_addr_info_to_section_offsets): Change type of "addrs".
6495 (addrs_section_compar): Now a std::sort comparator.
6496 (addrs_section_sort): Change return type.
6497 (addr_info_make_relative): Change type of "addrs". Update.
6498 (default_symfile_offsets, syms_from_objfile_1)
6499 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
6500 (symbol_file_add_separate): Update.
6501 (symbol_file_add): Change type of "addrs". Update.
6502 (add_symbol_file_command): Update. Remove cleanups.
6503 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
6505 * symfile-debug.c (debug_sym_offsets): Change type of "info".
6506 * solib.c (solib_read_symbols): Update.
6507 * objfiles.c (objfile_relocate): Update. Remove cleanups.
6508 * machoread.c (macho_symfile_offsets): Update.
6509 * jit.c (jit_bfd_try_read_symtab): Update.
6511 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
6513 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6514 unittests/utils-selftests.c.
6515 * unittests/utils-selftests.c: New file.
6517 2018-03-14 Tom Tromey <tom@tromey.com>
6520 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
6523 2018-03-14 Tom Tromey <tom@tromey.com>
6526 * printcmd.c (printf_pointer): Allow "-" in format.
6528 2018-03-14 Tom Tromey <tom@tromey.com>
6530 * printcmd.c (_initialize_printcmd): Add usage to printf.
6532 2018-03-14 Yao Qi <qiyao@sourceware.org>
6534 * MAINTAINERS: Update my email address.
6536 2018-03-13 Tom Tromey <tom@tromey.com>
6538 * machoread.c (macho_check_dsym): Change filenamep to a
6540 (macho_symfile_read): Update.
6541 * symfile.c (load_command): Use std::string.
6543 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
6545 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
6546 to error message string.
6547 (riscv_register_name): Use xsnprintf instead of sprintf.
6548 (riscv_insn::fetch_instruction): Use gdb_assert instead of
6550 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
6552 (riscv_push_dummy_call): Likewise.
6554 2018-03-12 Tom Tromey <tom@tromey.com>
6556 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
6557 Use gdb::byte_vector.
6558 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
6560 2018-03-12 Yao Qi <yao.qi@linaro.org>
6562 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
6563 parameter type to readable_regcache.
6564 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
6567 2018-03-11 Tom Tromey <tom@tromey.com>
6569 * dwarf2read.c (struct nextfield): Add initializers.
6570 (struct nextfnfield): Remove.
6571 (struct fnfieldlist): Add initializers. Remove "length" and
6572 "head", use std::vector.
6573 (struct decl_field_list): Remove.
6574 (struct field_info): Add initializers.
6575 <fields, baseclasses>: Now std::vector.
6576 <nbaseclasses, nfnfields, typedef_field_list_count,
6577 nested_types_list_count>: Remove.
6578 (dwarf2_add_field, dwarf2_add_type_defn)
6579 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
6580 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
6581 (process_structure_scope): Update.
6583 2018-03-11 Tom Tromey <tom@tromey.com>
6585 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
6586 for use by std::sort.
6587 (build_type_psymtabs_1): Use std::vector.
6589 2018-03-09 Eli Zaretskii <eliz@gnu.org>
6591 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
6592 and LIBMPFR in the printed configuration.
6594 2018-03-08 Tom Tromey <tom@tromey.com>
6596 * source.c (get_filename_and_charpos): Use scoped_fd.
6597 * nto-procfs.c (procfs_open_1): Use scoped_fd.
6598 (procfs_pidlist): Likewise.
6599 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
6600 (iterate_over_mappings): Likewise.
6602 2018-03-08 Tom Tromey <tom@tromey.com>
6604 * infcall.c (struct call_return_meta_info)
6605 <stack_temporaries_enabled>: Remove.
6606 (get_call_return_value, call_function_by_hand_dummy): Update.
6607 * thread.c (disable_thread_stack_temporaries): Remove.
6608 (enable_thread_stack_temporaries): Remove.
6609 (thread_stack_temporaries_enabled_p): Return bool.
6610 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
6611 (get_last_thread_stack_temporary): Update.
6612 * eval.c (evaluate_subexp): Update.
6613 * gdbthread.h (class enable_thread_stack_temporaries): Now a
6614 class, not a function.
6615 (value_ptr, value_vec): Remove typedefs.
6616 (class thread_info) <stack_temporaries_enabled>: Now bool.
6617 <stack_temporaries>: Now a std::vector.
6618 (thread_stack_temporaries_enabled_p)
6619 (value_in_thread_stack_temporaries): Return bool.
6621 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
6623 * remote.c (putpkt_binary): Fix omitted bytes reporting.
6624 (getpkt_or_notif_sane_1): Likewise.
6626 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6628 * build-id.c (build_id_to_debug_bfd): Use std::string.
6630 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6632 * build-id.c (find_separate_debug_file_by_buildid): Return
6634 * build-id.h (find_separate_debug_file_by_buildid): Return
6636 * coffread.c (coff_symfile_read): Adjust to std::string.
6637 * elfread.c (elf_symfile_read): Adjust to std::string.
6638 * symfile.c (separate_debug_file_exists): Change parameter to
6640 (find_separate_debug_file): Return std::string.
6641 (find_separate_debug_file_by_debuglink): Return std::string.
6642 * symfile.h (find_separate_debug_file_by_debuglink): Return
6645 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6647 * common/xml-utils.c (xml_escape_text): Move code to...
6648 (xml_escape_text_append): ... this new function.
6649 * common/xml-utils.h (xml_escape_text_append): New declaration.
6650 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6652 (_initialize_xml_utils): register test_xml_escape_text_append as
6655 2018-03-07 Alan Hayward <alan.hayward@arm.com>
6657 * defs.h: Remove MAX_REGISTER_SIZE.
6658 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6660 * python/py-unwind.c (pyuw_sniffer): Likewise.
6662 2018-03-07 Tom Tromey <tom@tromey.com>
6664 * linux-tdep.c (linux_info_proc): Update.
6665 * target.h (struct target_ops) <to_fileio_readlink>: Return
6667 (target_fileio_readlink): Return optional<string>.
6668 * remote.c (remote_hostio_readlink): Return optional<string>.
6669 * inf-child.c (inf_child_fileio_readlink): Return
6671 * target.c (target_fileio_readlink): Return optional<string>.
6673 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
6675 * regcache.c (cooked_read_test): Add riscv to the list of
6676 architectures that have a save_reggroup.
6678 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
6680 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6681 value is not a dynamic class object.
6683 2018-03-06 Tom Tromey <tom@tromey.com>
6685 * rust-exp.y: Formatting fixes.
6687 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6689 * riscv-tdep.c (riscv_register_name): Remove target description
6691 (riscv_gdbarch_init): Remove target description check.
6693 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6695 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6697 * riscv-tdep.h: Likewise.
6699 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6701 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6702 (riscv_pseudo_register_write): Delete.
6703 (riscv_gdbarch_init): Remove all use of pseudo registers.
6705 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6707 * record-btrace.c (btrace_print_lines): Replace cleanup
6708 parameter with RAII equivalents.
6709 (btrace_insn_history): Replace cleanup with RAII equivalents.
6710 * ui-out.h (make_cleanup_ui_out_list_begin_end,
6711 make_cleanup_ui_out_tuple_begin_end): Remove.
6712 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6713 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6714 make_cleanup_ui_out_list_begin_end): Remove.
6716 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6718 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6719 parameter types to std::vector. Use bool.
6720 (record_btrace_wait): Replace VEC(tp_t) with
6721 std::vector<thread_info *>.
6722 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6724 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6726 * record-btrace.c (record_btrace_disable_callback): Remove.
6727 (struct scoped_btrace_disable): New.
6728 (record_btrace_open): Use scoped_btrace_disable.
6730 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6732 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6733 reading values from registers.
6735 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6737 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6740 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6742 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6743 change parameter type. Use GDB's print functions, and use
6744 core_addr_to_string where appropriate.
6745 (riscv_push_dummy_call): Use core_addr_to_string where
6746 appropriate, update call to riscv_print_arg_location, and reindent
6748 (riscv_return_value): Update call to riscv_print_arg_location.
6750 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6751 Tim Newsome <tim@sifive.com>
6752 Albert Ou <a0u@eecs.berkeley.edu>
6753 Darius Rad <darius@bluespec.com>
6755 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6756 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6757 (ALLDEPFILES): Add riscv-tdep.c
6758 * configure.tgt: Add riscv support.
6759 * riscv-tdep.c: New file.
6760 * riscv-tdep.h: New file.
6761 * NEWS: Mention new target.
6762 * MAINTAINERS: Add entry for riscv.
6764 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6766 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6767 fields within aggregates.
6769 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
6771 * record-btrace.c (btrace_print_lines): Change type of flags to
6772 gdb_disassembly_flags.
6774 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6776 * fbsd-nat.c: Include "inf-ptrace.h".
6777 (USE_SIGTRAP_SIGINFO): Conditionally define.
6778 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6779 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6780 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6782 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6784 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6786 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6787 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6788 "supports_stopped_by_hw_breakpoint" target methods.
6790 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6792 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6793 * fbsd-nat.c (debug_fbsd_nat): New variable.
6794 (show_fbsd_nat_debug): New function.
6795 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6796 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6798 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6800 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6801 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6803 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6804 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6807 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6809 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6810 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6812 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6814 * charset.c (struct charset_vector): New.
6815 (charsets): Change type to charset_vector.
6816 (find_charset_names): Adjust.
6818 (_initialize_charset): Adjust.
6820 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6822 * progspace.h (struct program_space) <deleted_solibs>: Change
6823 type to std::vector<std::string>.
6824 * progspace.c (clear_program_space_solib_cache): Adjust.
6825 * breakpoint.c (print_solib_event): Adjust.
6826 (check_status_catch_solib): Adjust.
6827 * solib.c (update_solib_list): Adjust.
6828 * ui-out.h (class ui_out) <field_string>: New overload.
6829 * ui-out.c (ui_out::field_string): New overload.
6831 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6833 * progspace.h (struct program_space): Add constructor and
6834 destructor, initialize fields.
6835 (add_program_space): Remove.
6836 * progspace.c (add_program_space): Rename to...
6837 (program_space::program_space): ... this.
6838 (release_program_space): Rename to...
6839 (program_space::~program_space): ... this.
6840 (delete_program_space): Use delete to delete program_space.
6841 (initialize_progspace): Use new to allocate program_space.
6842 * inferior.c (add_inferior_with_spaces): Likewise.
6843 (clone_inferior_command): Likewise.
6844 * infrun.c (follow_fork_inferior): Likewise.
6845 (handle_vfork_child_exec_or_exit): Likewise.
6847 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6849 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6850 (delim_string_to_char_ptr_vec): Return std::vector of
6851 gdb::unique_xmalloc_ptr.
6852 (dirnames_to_char_ptr_vec_append): Take std::vector of
6853 gdb::unique_xmalloc_ptr.
6854 (dirnames_to_char_ptr_vec): Return std::vector of
6855 gdb::unique_xmalloc_ptr.
6856 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6857 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6858 (delim_string_to_char_ptr_vec): Return an std::vector of
6859 gdb::unique_xmalloc_ptr, adjust the code.
6860 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6861 gdb::unique_xmalloc_ptr, adjust the code.
6862 (dirnames_to_char_ptr_vec): Return an std::vector of
6863 gdb::unique_xmalloc_ptr, adjust the code.
6864 * auto-load.c (auto_load_safe_path_vec): Change type to
6865 std::vector of gdb::unique_xmalloc_ptr.
6866 (auto_load_expand_dir_vars): Return an std::vector of
6867 gdb::unique_xmalloc_ptr, adjust the code.
6868 (auto_load_safe_path_vec_update): Adjust.
6869 (filename_is_in_auto_load_safe_path_vec): Adjust.
6870 (auto_load_objfile_script_1): Adjust.
6871 * build-id.c (build_id_to_debug_bfd): Adjust.
6872 * linux-thread-db.c (thread_db_load_search): Adjust.
6873 * source.c (add_path): Adjust.
6875 * symfile.c (find_separate_debug_file): Adjust.
6876 * utils.c (do_free_char_ptr_vec): Remove.
6877 (make_cleanup_free_char_ptr_vec): Remove.
6879 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6882 * common/pathstuff.c: Conditionally include "<windows.h>".
6884 2018-03-01 Georg Sauthoff <mail@georg.so>
6887 * gcore.in: Quote variables and switch interpreter to bash.
6889 2018-03-01 Tom Tromey <tom@tromey.com>
6891 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6892 assertion. Add assertion for discriminant_index.
6893 (quirk_rust_enum): Use correct base type name in univariant case.
6895 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6897 * record.c (get_call_history_modifiers): Return a
6899 (cmd_record_call_history): Adjust.
6900 * record-btrace.c (record_btrace_call_history): Adjust.
6901 (record_btrace_call_history_range): Adjust.
6902 (record_btrace_call_history_from): Adjust.
6903 * target-debug.h (target_debug_print_record_print_flags): New.
6904 * target-delegates.c: Re-generate.
6905 * target.c (target_call_history): Change flags type.
6906 (target_call_history_from): Likewise.
6907 (target_call_history_range): Likewise.
6908 * target.h (struct target_ops) <target_call_history>: Likewise.
6909 (target_call_history_from): Likewise.
6910 (target_call_history_range): Likewise.
6912 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6913 Simon Marchi <simon.marchi@polymtl.ca>
6915 * common/common-utils.c: Include "sys/stat.h".
6916 (is_regular_file): Move here from "source.c"; change return
6918 * common/common-utils.h (is_regular_file): New prototype.
6919 * common/pathstuff.c (contains_dir_separator): New function.
6920 * common/pathstuff.h (contains_dir_separator): New prototype.
6921 * source.c: Don't include "sys/stat.h".
6922 (is_regular_file): Move to "common/common-utils.c".
6924 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6926 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6927 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6928 * auto-load.c: Include "common/pathstuff.h".
6929 * common/common-def.h (current_directory): Move here.
6930 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6932 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6934 * common/pathstuff.c: New file.
6935 * common/pathstuff.h: New file.
6936 * compile/compile.c: Include "common/pathstuff.h".
6937 * defs.h (current_directory): Move to "common/common-defs.h".
6938 * dwarf2read.c: Include "common/pathstuff.h".
6940 * guile/scm-safe-call.c: Likewise.
6941 * linux-thread-db.c: Likewise.
6943 * nto-tdep.c: Likewise.
6944 * objfiles.c: Likewise.
6945 * source.c: Likewise.
6946 * symtab.c: Likewise.
6947 * utils.c: Include "common/pathstuff.h".
6948 (gdb_realpath): Move to "common/pathstuff.c".
6949 (gdb_realpath_keepfile): Likewise.
6950 (gdb_abspath): Likewise.
6951 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6952 (gdb_realpath_keepfile): Likewise.
6953 (gdb_abspath): Likewise.
6955 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6957 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6958 wildcard process pid for super_resume for kernels with a
6961 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
6963 * compile/compile.c (get_args): Add additional comments
6964 explaining function.
6966 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
6967 Tom Tromey <tom@tromey.com>
6969 * target.h (memory_write_request_s): Remove typedef. Don't define
6971 (target_write_memory_blocks): Change argument to std::vector.
6972 (struct memory_write_request): Add constructor.
6973 * target-memory.c (compare_block_starting_address): Return bool.
6974 Change argument types.
6975 (claim_memory): Change arguments to use std::vector.
6976 (split_regular_and_flash_blocks, blocks_to_erase)
6977 (compute_garbled_blocks): Likewise.
6978 (cleanup_request_data, cleanup_write_requests_vector): Remove.
6979 (target_write_memory_blocks): Change argument to std::vector.
6980 * symfile.c (struct load_section_data): Add constructor and
6981 destructor. Use std::vector for "requests".
6982 (struct load_progress_data): Add initializers.
6983 (load_section_callback): Update. Use "new".
6984 (clear_memory_write_data): Remove.
6985 (generic_load): Update.
6987 2018-02-27 Alan Hayward <alan.hayward@arm.com>
6989 * arch/aarch64.h: Use common/tdesc.h.
6991 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6993 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6994 architecture with a 64-bit ABI.
6996 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6998 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6999 ahead of target description loading.
7001 2018-02-26 Tom Tromey <tom@tromey.com>
7003 * stack.c (backtrace_command_1): Update.
7004 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7006 * python/py-framefilter.c (py_print_frame)
7007 (gdbpy_apply_frame_filter): Change type of "flags".
7008 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7010 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7011 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7012 * extension.h (enum frame_filter_flag): Rename from
7014 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7015 (apply_ext_lang_frame_filter): Change type of "flags".
7016 * extension.c (apply_ext_lang_frame_filter): Change type of
7018 * extension-priv.h (struct extension_language_ops)
7019 <apply_frame_filter>: Change type of "flags".
7021 2018-02-26 Tom Tromey <tom@tromey.com>
7024 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7025 off-by-one in py_end computation.
7026 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7028 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7031 2018-02-26 Tom Tromey <tom@tromey.com>
7033 * dwarf2read.c (struct variant_field): New.
7034 (struct nextfield) <variant>: New field.
7035 (dwarf2_add_field): Handle DW_TAG_variant_part.
7036 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7037 discriminated union.
7038 (read_structure_type): Handle DW_TAG_variant_part.
7039 (handle_struct_member_die): New function, extracted from
7040 process_structure_scope. Handle DW_TAG_variant.
7041 (process_structure_scope): Handle discriminated unions. Call
7042 handle_struct_member_die.
7044 2018-02-26 Tom Tromey <tom@tromey.com>
7046 * rust-lang.h (rust_last_path_segment): Declare.
7047 * rust-lang.c (rust_last_path_segment): Now public. Change
7049 (struct disr_info): Remove.
7050 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7051 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7052 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7053 (rust_enum_p, rust_enum_variant): New function.
7054 (rust_underscore_fields): Remove "offset" parameter.
7055 (rust_print_enum): New function.
7056 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7057 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7058 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7060 (rust_internal_print_type): New function, from rust_print_type.
7062 (rust_print_type): Call rust_internal_print_type.
7063 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7064 Update enum handling.
7065 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7066 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7067 (rust_union_quirks): New functions.
7068 (process_full_comp_unit, process_full_type_unit): Call
7070 (process_structure_scope): Update rust_unions if necessary.
7072 2018-02-26 Tom Tromey <tom@tromey.com>
7074 * value.h (value_union_variant): Declare.
7075 * valops.c (value_union_variant): New function.
7076 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7077 (struct discriminant_info): New.
7078 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7080 (struct main_type) <flag_discriminated_union>: New field.
7082 2018-02-26 Tom Tromey <tom@tromey.com>
7084 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7085 unittests/unpack-selftests.c.
7086 * unittests/unpack-selftests.c: New file.
7087 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7089 2018-02-26 Yao Qi <yao.qi@linaro.org>
7091 * dwarf2read.c (struct partial_die_info) <read>: New method.
7092 (read_partial_die): Remove the declaration.
7093 (load_partial_dies): Update.
7094 (partial_die_info::partial_die_info):
7095 (read_partial_die): Change it to partial_die_info::read.
7097 2018-02-26 Yao Qi <yao.qi@linaro.org>
7099 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7100 (fixup_partial_die): Remove declaration.
7101 (scan_partial_symbols): Update.
7102 (partial_die_parent_scope): Likewise.
7103 (partial_die_full_name): Likewise.
7104 (fixup_partial_die): Change it to partial_die_info::fixup.
7106 2018-02-26 Yao Qi <yao.qi@linaro.org>
7108 * dwarf2read.c (read_partial_die): Update the declaration.
7109 (load_partial_dies): Caller update.
7110 (read_partial_die): Remove one argument abbrev_len.
7112 2018-02-26 Yao Qi <yao.qi@linaro.org>
7114 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7115 assignment operator.
7116 (load_partial_dies): Use ctor and copy ctor.
7117 (read_partial_die): Update.
7118 (dwarf2_cu::find_partial_die): Use ctor.
7120 2018-02-26 Yao Qi <yao.qi@linaro.org>
7122 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7123 (find_partial_die_in_comp_unit): Change it to
7124 dwarf2_cu::find_partial_die.
7125 (find_partial_die): Update.
7127 2018-02-26 Yao Qi <yao.qi@linaro.org>
7129 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7132 2018-02-26 Yao Qi <yao.qi@linaro.org>
7134 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7136 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7138 * arch/amd64.h: Use common/tdesc.h.
7139 * arch/i386.c: Likewise.
7140 * arch/i386.h: Likewise.
7141 * arch/tic6x.c: Likewise.
7142 * arch/tdesc.h: Move file from here...
7143 * common/tdesc.h: ...to here.
7144 * features/aarch64-core.c: Regenerate.
7145 * features/aarch64-fpu.c: Regenerate.
7146 * features/i386/32bit-avx.c: Regenerate.
7147 * features/i386/32bit-avx512.c: Regenerate.
7148 * features/i386/32bit-core.c: Regenerate.
7149 * features/i386/32bit-linux.c: Regenerate.
7150 * features/i386/32bit-mpx.c: Regenerate.
7151 * features/i386/32bit-pkeys.c: Regenerate.
7152 * features/i386/32bit-sse.c: Regenerate.
7153 * features/i386/64bit-avx.c: Regenerate.
7154 * features/i386/64bit-avx512.c: Regenerate.
7155 * features/i386/64bit-core.c: Regenerate.
7156 * features/i386/64bit-linux.c: Regenerate.
7157 * features/i386/64bit-mpx.c: Regenerate.
7158 * features/i386/64bit-pkeys.c: Regenerate.
7159 * features/i386/64bit-segments.c: Regenerate.
7160 * features/i386/64bit-sse.c: Regenerate.
7161 * features/i386/x32-core.c: Regenerate.
7162 * features/tic6x-c6xp.c: Regenerate.
7163 * features/tic6x-core.c: Regenerate.
7164 * features/tic6x-gp.c: Regenerate.
7165 * target-descriptions.c: Use common/tdesc.h.
7166 * target-descriptions.h: Likewise.
7168 2018-02-24 Tom Tromey <tom@tromey.com>
7170 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7171 (try_thread_db_load_from_dir, thread_db_load_search): Use
7173 (info_auto_load_libthread_db_compare): Return bool. Change
7175 (info_auto_load_libthread_db): Use std::vector, std::string.
7178 2018-02-24 Tom Tromey <tom@tromey.com>
7180 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7182 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7184 * gdbarch.c: Rebuild.
7185 * gdbarch.h: Rebuild.
7186 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7187 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7188 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7191 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7193 * gdbtypes.h (sect_offset): Change type to uint64_t.
7194 (sect_offset_str): New function.
7195 * dwarf2read.c (create_addrmap_from_aranges): Use
7197 (error_check_comp_unit_head): Likewise.
7198 (create_debug_type_hash_table): Likewise.
7199 (read_cutu_die_from_dwo): Likewise.
7200 (init_cutu_and_read_dies): Likewise.
7201 (init_cutu_and_read_dies_no_follow): Likewise.
7202 (process_psymtab_comp_unit_reader): Likewise.
7203 (partial_die_parent_scope): Likewise.
7204 (peek_die_abbrev): Likewise.
7205 (process_queue): Likewise.
7206 (dwarf2_physname): Likewise.
7207 (read_namespace_alias): Likewise.
7208 (read_import_statement): Likewise.
7209 (create_dwo_cu_reader): Likewise.
7210 (create_cus_hash_table): Likewise.
7211 (lookup_dwo_cutu): Likewise.
7212 (inherit_abstract_dies): Likewise.
7213 (read_func_scope): Likewise.
7214 (read_call_site_scope): Likewise.
7215 (dwarf2_add_member_fn): Likewise.
7216 (read_common_block): Likewise.
7217 (read_module_type): Likewise.
7218 (read_typedef): Likewise.
7219 (read_subrange_type): Likewise.
7220 (load_partial_dies): Likewise.
7221 (read_partial_die): Likewise.
7222 (find_partial_die): Likewise.
7223 (read_str_index): Likewise.
7224 (dwarf2_string_attr): Likewise.
7225 (build_error_marker_type): Likewise.
7226 (lookup_die_type): Likewise.
7227 (dump_die_shallow): Likewise.
7228 (follow_die_ref): Likewise.
7229 (dwarf2_fetch_die_loc_sect_off): Likewise.
7230 (dwarf2_fetch_constant_bytes): Likewise.
7231 (follow_die_sig): Likewise.
7232 (get_signatured_type): Likewise.
7233 (get_DW_AT_signature_type): Likewise.
7234 (dwarf2_find_containing_comp_unit): Likewise.
7235 (set_die_type): Likewise.
7237 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7239 * arch/aarch64.c: Include "common-defs.h".
7240 * arch/amd64.c: Likewise.
7241 * arch/i386.c: Likewise.
7243 2018-02-21 Tom Tromey <tom@tromey.com>
7245 * value.h: (extract_field_op): Update.
7246 * eval.c (extract_field_op): Return a const char *.
7247 * expression.h (parse_expression_for_completion): Update.
7248 * completer.c (complete_expression): Update.
7249 (add_struct_fields): Make fieldname const.
7250 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7251 (mark_completion_tag, parse_exp_in_context_1): Update.
7252 (parse_expression_for_completion): Change "name" to
7253 unique_xmalloc_ptr*.
7255 2018-02-21 Tom Tromey <tom@tromey.com>
7257 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7259 2018-02-21 Yao Qi <yao.qi@linaro.org>
7261 * avr-tdep.c (avr_read_pc): Change parameter type to
7263 * gdbarch.sh (read_pc): Likewise.
7264 * gdbarch.c: Re-generated.
7265 * gdbarch.h: Re-generated.
7266 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7268 * ia64-tdep.c (ia64_read_pc): Likewise.
7269 * mips-tdep.c (mips_read_pc): Likewise.
7270 * spu-tdep.c (spu_read_pc): Likewise.
7272 2018-02-21 Yao Qi <yao.qi@linaro.org>
7274 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7275 * regcache-dump.c: New file.
7276 * regcache.c: Move register_dump to regcache-dump.c.
7277 (maintenance_print_registers): Likewise.
7278 (maintenance_print_raw_registers): Likewise.
7279 (maintenance_print_cooked_registers): Likewise.
7280 (maintenance_print_register_groups): Likewise.
7281 (maintenance_print_remote_registers): Likewise.
7282 (_initialize_regcache): Likewise.
7283 * regcache.h (register_dump): Moved from regcache.c.
7285 2018-02-21 Yao Qi <yao.qi@linaro.org>
7287 * regcache.c (regcache::regcache): Update.
7288 (regcache::invalidate): Move it to detached_regcache::invalidate.
7289 (get_thread_arch_aspace_regcache): Update.
7290 (regcache::raw_update): Update.
7291 (regcache::cooked_read): Remove some code.
7292 (regcache::cooked_read_value): Likewise.
7293 (regcache::raw_write): Remove assert on m_readonly_p.
7294 (regcache::raw_supply_integer): Move it to
7295 detached_regcache::raw_supply_integer.
7296 (regcache::raw_supply_zeroed): Likewise.
7297 * regcache.h (detached_regcache) <raw_supply_integer>: New
7299 <raw_supply_zeroed, invalidate>: Likewise.
7300 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7301 <invalidate>: Likewise.
7302 <m_readonly_p>: Removed.
7304 2018-02-21 Yao Qi <yao.qi@linaro.org>
7306 * infcmd.c (get_return_value): Let stop_regs point to
7307 get_current_regcache.
7308 * regcache.c (regcache::regcache): Remove.
7309 (register_dump_reg_buffer): New class.
7310 (regcache_print): Adjust.
7311 * regcache.h (regcache): Remove constructors.
7313 2018-02-21 Yao Qi <yao.qi@linaro.org>
7315 * regcache.c (class register_dump): New class.
7316 (register_dump_regcache, register_dump_none): New class.
7317 (register_dump_remote, register_dump_groups): New class.
7318 (regcache_print): Update.
7319 * regcache.h (regcache_dump_what): Move it to regcache.c.
7320 (regcache) <dump>: Remove.
7322 2018-02-21 Yao Qi <yao.qi@linaro.org>
7324 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
7326 (jit_unwind_reg_set_impl): Call raw_supply.
7327 (jit_frame_sniffer): Use reg_buffer_rw.
7328 * record-full.c (record_full_core_regbuf): Change its type.
7329 (record_full_core_open_1): Use reg_buffer_rw.
7330 (record_full_close): Likewise.
7331 (record_full_core_fetch_registers): Use regcache->raw_supply.
7332 (record_full_core_store_registers): Likewise.
7333 * regcache.c (regcache::get_register_status): Move it to
7335 (regcache_raw_set_cached_value): Remove.
7336 (regcache::raw_set_cached_value): Remove.
7337 (regcache::raw_write): Call raw_supply.
7338 (regcache::raw_supply): Move it to reg_buffer_rw.
7339 * regcache.h (regcache_raw_set_cached_value): Remove.
7340 (reg_buffer_rw): New class.
7342 2018-02-21 Yao Qi <yao.qi@linaro.org>
7344 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
7345 readonly_detached_regcache.
7346 (dummy_frame_prev_register): Use regcache->cooked_read.
7347 * frame.c (frame_save_as_regcache): Change return type.
7348 (frame_pop): Update.
7349 * frame.h (frame_save_as_regcache): Update declaration.
7350 * inferior.h (get_infcall_suspend_state_regcache): Update
7352 * infrun.c (infcall_suspend_state) <registers>: use
7353 readonly_detached_regcache.
7354 (save_infcall_suspend_state): Don't use regcache_dup.
7355 (get_infcall_suspend_state_regcache): Change return type.
7356 * linux-fork.c (struct fork_info) <savedregs>: Change to
7357 readonly_detached_regcache.
7359 (fork_save_infrun_state): Don't use regcache_dup.
7360 (info_checkpoints_command): Adjust.
7361 * mi/mi-main.c (register_changed_p): Update declaration.
7362 (mi_cmd_data_list_changed_registers): Use
7363 readonly_detached_regcache.
7364 (register_changed_p): Change parameter type to
7365 readonly_detached_regcache.
7366 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
7367 readonly_detached_regcache.
7368 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
7369 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
7371 (regcache::save): Move it to reg_buffer.
7372 (regcache::restore): Change parameter type.
7373 (regcache_dup): Remove.
7374 * regcache.h (reg_buffer) <save>: New method.
7375 (readonly_detached_regcache): New class.
7376 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
7377 readonly_detached_regcache.
7378 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
7380 2018-02-21 Yao Qi <yao.qi@linaro.org>
7382 * frame.c (frame_save_as_regcache): Use regcache method save.
7383 (frame_pop): Use regcache method restore.
7384 * infrun.c (restore_infcall_suspend_state): Likewise.
7385 * linux-fork.c (fork_load_infrun_state): Likewise.
7386 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
7388 * regcache.c (regcache_save): Remove.
7389 (regcache::restore): More asserts.
7390 (regcache_cpy): Remove.
7391 * regcache.h (regcache_save): Remove the declaration.
7392 (regcache::restore): Move from private to public.
7393 Remove the friend declaration of regcache_cpy.
7394 (regcache_cpy): Remove declaration.
7396 2018-02-21 Yao Qi <yao.qi@linaro.org>
7398 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
7399 parameter type to 'readable_regcache *'.
7400 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7401 * arm-tdep.c (arm_neon_quad_read): Likewise.
7402 (arm_pseudo_read): Likewise.
7403 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7404 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7405 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7406 * gdbarch.c: Re-generated.
7407 * gdbarch.h: Re-generated.
7408 * gdbarch.sh (pseudo_register_read): Change parameter type to
7409 'readable_regcache *'.
7410 (pseudo_register_read_value): Likewise.
7411 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
7412 (h8300_pseudo_register_read): Likewise.
7413 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
7414 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7415 (i386_pseudo_register_read_into_value): Likewise.
7416 (i386_pseudo_register_read_value): Likewise.
7417 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
7419 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
7420 * m32c-tdep.c (m32c_raw_read): Likewise.
7421 (m32c_read_flg): Likewise.
7422 (m32c_banked_register): Likewise.
7423 (m32c_banked_read): Likewise.
7424 (m32c_sb_read): Likewise.
7425 (m32c_part_read): Likewise.
7426 (m32c_cat_read): Likewise.
7427 (m32c_r3r2r1r0_read): Likewise.
7428 (m32c_pseudo_register_read): Likewise.
7429 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7430 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7431 (mep_pseudo_cr64_read): Likewise.
7432 (mep_pseudo_register_read): Likewise.
7433 * mips-tdep.c (mips_pseudo_register_read): Likewise.
7434 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7435 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7436 * regcache.c (regcache::raw_read): Move it to readable_regcache.
7437 (regcache::cooked_read): Likewise.
7438 (regcache::cooked_read_value): Likewise.
7439 (regcache_cooked_read_signed):
7440 (regcache::cooked_read): Likewise.
7441 * regcache.h (readable_regcache): New class.
7442 (regcache): Inherit readable_regcache. Move some methods to
7444 * rl78-tdep.c (rl78_pseudo_register_read): Change
7445 parameter type to 'readable_regcache *'.
7446 * rs6000-tdep.c (do_regcache_raw_read): Remove.
7447 (e500_pseudo_register_read): Change parameter type to
7448 'readable_regcache *'.
7449 (dfp_pseudo_register_read): Likewise.
7450 (vsx_pseudo_register_read): Likewise.
7451 (efpr_pseudo_register_read): Likewise.
7452 * s390-tdep.c (s390_pseudo_register_read): Likewise.
7453 * sh-tdep.c (sh_pseudo_register_read): Likewise.
7454 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
7455 (sh64_pseudo_register_read): Likewise.
7456 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7457 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7458 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7459 (spu_pseudo_register_read): Likewise.
7460 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7461 (xtensa_pseudo_register_read): Likewise.
7463 2018-02-21 Yao Qi <yao.qi@linaro.org>
7465 * regcache.c (regcache::regcache): Call reg_buffer ctor.
7466 (regcache::arch): Move it to reg_buffer::arch.
7467 (regcache::register_buffer): Likewise.
7468 (regcache::assert_regnum): Likewise.
7469 (regcache::num_raw_registers): Likewise.
7470 * regcache.h (reg_buffer): New class.
7471 (regcache): Inherit reg_buffer.
7473 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
7475 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
7476 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
7478 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
7480 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
7482 2018-02-19 Alan Hayward <alan.hayward@arm.com>
7484 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
7485 (SFILES): Remove common/*.c files.
7486 (COMMON_OBS): Remove some *.o files built from common/*.c files.
7487 * common/common.host: Add common reference.
7488 * configure.ac: Likewise.
7489 * configure: Regenerate.
7491 2018-02-16 Yao Qi <yao.qi@linaro.org>
7493 * block.c (block_namespace_info): Inherit allocate_on_obstack.
7494 (block_initialize_namespace): Use new.
7495 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
7496 (dwarf2_free_objfile): Use delete.
7497 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
7498 (copy_type_recursive): Use new.
7499 * gdb_obstack.h (allocate_on_obstack): New.
7501 2018-02-15 Yao Qi <yao.qi@linaro.org>
7504 * inferior.c (exit_inferior_1): Reset inf->control.
7506 2018-02-15 Joel Brobecker <brobecker@adacore.com>
7508 * ada-lang.c (ada_to_fixed_value_create): Delete advance
7511 2018-02-14 Pedro Alves <palves@redhat.com>
7513 * frame-unwind.c (frame_unwind_try_unwinder): Always call
7514 frame_cleanup_after_sniffer on exception.
7516 2018-02-14 Tom Tromey <tom@tromey.com>
7518 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
7520 (solib_bfd_open): Make pathname const.
7521 * solib.c (solib_bfd_open): Make pathname const.
7522 * solib-spu.c (spu_bfd_fopen): Make name const.
7523 (spu_bfd_open): Make pathname const.
7524 * solib-darwin.c (darwin_bfd_open): Make pathname const.
7525 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
7527 2018-02-14 Tom Tromey <tom@tromey.com>
7529 * symfile.c (symfile_bfd_open): Update.
7530 * source.h (openp, source_full_path_of, find_and_open_source):
7531 Change argument type to unique_xmalloc_ptr.
7532 * source.c (openp): Take a unique_xmalloc_ptr.
7533 (source_full_path_of, find_and_open_source): Likewise.
7534 (open_source_file, symtab_to_fullname): Update.
7535 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
7537 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
7538 (exec_file_find): Update.
7539 * psymtab.c (psymtab_to_fullname): Update.
7540 * nto-tdep.h (nto_find_and_open_solib): Update.
7541 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
7543 * exec.c (exec_file_attach): Update.
7544 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
7545 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
7547 2018-02-14 Tom Tromey <tom@tromey.com>
7549 * solib.c: Include source.h.
7550 * nto-tdep.c: Include source.h.
7551 * mi/mi-cmd-env.c: Include source.h.
7552 * infcmd.c: Include source.h.
7553 * exec.c: Include source.h.
7554 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
7555 (add_path, directory_switch, source_path, init_source_path): Move
7557 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
7558 (add_path, directory_switch, source_path, init_source_path):
7561 2018-02-14 Tom Tromey <tom@tromey.com>
7563 * solist.h (exec_file_find, solib_find): Return
7565 (solib_bfd_fopen): Take a const char *.
7566 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
7567 (exec_file_find, solib_find): Likewise.
7568 (solib_bfd_fopen): Do not take ownership of "pathname".
7569 (solib_bfd_open): Use unique_xmalloc_ptr.
7570 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
7571 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
7572 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
7573 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
7575 2018-02-14 Joel Brobecker <brobecker@adacore.com>
7577 * ada-lang.c (name_match_type_from_name): Remove reference to
7578 ada_name_for_lookup in function's documentation.
7579 * ada-lang.h (ada_name_for_lookup): Delete declaration.
7581 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7583 * defs.h (enum openp_flags): New enum.
7584 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
7585 Move to enum openp_flags.
7586 (openp_flags): New enum flags.
7587 (openp): Change parameter type to openp_flags.
7588 * source.c (openp): Change parameter type to openp_flags.
7589 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
7590 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
7592 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
7594 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
7597 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
7599 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
7601 (class dwarf2_queue_guard): ...the destructor of this new class.
7602 (dw2_do_instantiate_symtab): Create instance of the new class
7603 dwarf2_queue_guard, remove cleanup.
7605 2018-02-09 Tom Tromey <tom@tromey.com>
7607 * source.c (find_source_lines): Don't reference past the end of
7610 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7612 * remote.c (remote_btrace_maybe_reopen): Change error message.
7613 * btrace.c (btrace_enable): Likewise.
7614 (parse_xml_btrace): Likewise.
7615 (parse_xml_btrace_conf): Likewise.
7617 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7619 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
7620 (linux_enable_pt, linux_enable_bts): Call
7621 diagnose_perf_event_open_fail.
7623 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7625 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
7626 Remove parameter and change return type. Update callers. Move it.
7627 (linux_enable_bts, linux_enable_pt): Improve error message.
7628 (linux_enable_pt): Remove zero buffer size check.
7629 (linux_enable_btrace): Improve error messages. Remove NULL return
7632 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7634 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7635 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7636 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7637 (linux_supports_pt, linux_supports_btrace): Remove.
7638 (linux_enable_bts): Call cpu_supports_bts.
7639 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7640 * remote.c (remote_supports_btrace): Remove.
7641 (init_remote_ops): Remove remote_supports_btrace.
7642 * target-delegates.c: Regenerated.
7643 * target.c (target_supports_btrace): Remove.
7644 * target.h (target_ops) <to_supports_btrace>: Remove
7645 (target_supports_btrace): Remove.
7646 * x86-linux-nat.c (x86_linux_create_target): Remove
7647 linux_supports_btrace.
7649 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7651 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7653 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7654 exception and use message in own exception.
7656 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7658 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7659 (perf_event_pt_event_type): Use gdb_file_up.
7660 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7661 scoped_fd, and scoped_mmap.
7663 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7665 * common/scoped_mmap.h: New.
7666 * unittests/scoped_mmap-selftest.c: New.
7667 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7668 unittests/scoped_mmap-selftest.c.
7670 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7672 * common/scoped_fd.h: New.
7673 * unittests/scoped_fd-selftest.c: New.
7674 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7675 unittests/scoped_fd-selftest.c.
7677 2018-02-09 Tom Tromey <tom@tromey.com>
7679 * auto-load.c (auto_load_section_scripts): Use
7680 gdb::unique_xmalloc_ptr.
7682 2018-02-09 Tom Tromey <tom@tromey.com>
7684 * auto-load.c (execute_script_contents): Use std::string.
7686 2018-02-09 Joel Brobecker <brobecker@adacore.com>
7688 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7689 Python function, rather than a new command.
7691 2018-02-08 Tom Tromey <tom@tromey.com>
7693 * solib.c (solib_find_1): Use std::string.
7694 (solib_bfd_fopen): Use unique_xmalloc_ptr.
7696 2018-02-08 Tom Tromey <tom@tromey.com>
7698 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7700 2018-02-08 Tom Tromey <tom@tromey.com>
7702 * source.c (find_source_lines): Use gdb::def_vector.
7704 2018-02-08 Tom Tromey <tom@tromey.com>
7706 * macrocmd.c (struct temporary_macro_definition): New.
7707 (macro_define_command): Use temporary_macro_definition. Remove
7709 (free_macro_definition_ptr): Remove.
7711 2018-02-08 Tom Tromey <tom@tromey.com>
7713 * macroexp.c (maybe_expand): Use std::string.
7715 2018-02-08 Tom Tromey <tom@tromey.com>
7717 * macroexp.c (struct macro_buffer): Add initializers for some
7719 (init_buffer, init_shared_buffer, free_buffer)
7720 (free_buffer_return_text): Remove.
7721 (macro_buffer): New constructors.
7722 (~macro_buffer): New destructor.
7723 (macro_buffer::set_shared): New method.
7724 (macro_buffer::resize_buffer, macro_buffer::appendc)
7725 (macro_buffer::appendmem): Now methods, not free functions.
7726 (set_token, append_tokens_without_splicing, stringify)
7727 (macro_stringify): Update.
7728 (gather_arguments): Change return type. Remove argc_p argument,
7729 add args_ptr argument. Use std::vector.
7730 (substitute_args): Remove argc argument. Accept std::vector.
7731 (expand): Update. Use std::vector.
7732 (scan, macro_expand, macro_expand_next): Update.
7734 2018-02-08 Tom Tromey <tom@tromey.com>
7736 * symtab.c (default_collect_symbol_completion_matches_break_on):
7737 Use unique_xmalloc_ptr.
7738 * macroscope.h: (sal_macro_scope, user_macro_scope)
7739 (default_macro_scope): Return unique_xmalloc_ptr.
7740 * macroscope.c (sal_macro_scope, user_macro_scope)
7741 (default_macro_scope): Return unique_xmalloc_ptr.
7742 * macroexp.h (macro_expand, macro_expand_once): Return
7744 * macroexp.c (macro_expand, macro_expand_once): Return
7746 * macrocmd.c (macro_expand_command, macro_expand_once_command)
7747 (info_macro_command, info_macros_command): Use
7749 * compile/compile-c-support.c (write_macro_definitions): Use
7751 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7753 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
7755 * value.c (value_static_field): Assign field type instead of
7756 containing type when returning an optimized out value.
7758 2018-02-06 Yao Qi <yao.qi@linaro.org>
7760 * ft32-tdep.c (ft32_read_pc): Remove.
7761 (ft32_write_pc): Remove.
7762 (ft32_gdbarch_init): Update.
7763 * m32r-tdep.c (m32r_read_pc): Remove.
7764 (m32r_gdbarch_init): Update.
7765 * mep-tdep.c (mep_read_pc): Remove.
7766 (mep_gdbarch_init): Update.
7767 * microblaze-tdep.c (microblaze_write_pc): Remove.
7768 (microblaze_gdbarch_init): Update.
7769 * mn10300-tdep.c (mn10300_read_pc): Remove.
7770 (mn10300_write_pc): Remove.
7771 (mn10300_gdbarch_init): Update.
7772 * moxie-tdep.c (moxie_read_pc): Remove.
7773 (moxie_write_pc): Remove.
7774 (moxie_gdbarch_init): Update.
7776 2018-02-06 Yao Qi <yao.qi@linaro.org>
7778 * expprint.c (print_subexp_standard): Handle
7779 OP_F77_UNDETERMINED_ARGLIST.
7780 (dump_subexp_body_standard): Likewise.
7782 2018-02-05 Alan Hayward <alan.hayward@arm.com>
7784 * target-descriptions.c (tdesc_element_visitor) Add empty
7786 (tdesc_type): Move make_gdb_type from here.
7787 (tdesc_type_builtin): Likewise.
7788 (tdesc_type_vector): Likewise.
7789 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7790 (make_gdb_type_struct): Move from tdesc_type_with_fields.
7791 (make_gdb_type_union): Likewise.
7792 (make_gdb_type_flags): Likewise.
7793 (make_gdb_type_enum): Likewise.
7794 (make_gdb_type): New function.
7795 (tdesc_register_type): Use static make_gdb_type.
7797 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
7799 * infcmd.c (default_print_one_register_info): Align natural-format
7800 column values consistently one under another.
7801 (pad_to_column): New function.
7803 2018-02-05 Joel Brobecker <brobecker@adacore.com>
7805 * dwarf2read.c (dwarf2_physname): Move commment.
7807 2018-02-01 Leszek Swirski <leszeks@google.com>
7809 * varobj.c (varobj_formatted_print_options): Allow recursive
7810 pretty printing if pretty printing is enabled.
7812 2018-02-01 Leszek Swirski <leszeks@google.com>
7814 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7815 names after a structop as a filename.
7817 2018-02-01 Yao Qi <yao.qi@linaro.org>
7819 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7820 (arm_record_coproc_data_proc): Likewise.
7822 2018-02-01 Yao Qi <yao.qi@linaro.org>
7824 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7826 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
7828 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7829 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7831 2018-01-31 Pedro Alves <palves@redhat.com>
7833 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7834 * inflow.c (child_terminal_save_inferior): Wrap reference to
7835 tcgetpgrp in HAVE_TERMIOS_H.
7836 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7838 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7839 always iterate over all inferiors.
7840 (gdbsim_cntrl_c): Adjust.
7841 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7843 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7845 * gdbtypes.c (lookup_array_range_type): Make sure the array's
7846 index type is objfile-owned if the element type is as well.
7848 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7852 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7854 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7855 "features/s390x-linux64.c".
7856 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7857 s390_linux32 and s390x_linux64.
7858 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7860 * s390-tdep.c: Include "features/s390-linux32.c" and
7861 "features/s390x-linux64.c".
7862 (s390_tdesc_valid): Add check for tdesc_has_registers.
7863 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7864 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7865 tdesc_s390x_linux64.
7866 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7867 tdesc_s390x_linux64 to...
7868 * s390-tdep.h: ...here.
7870 2018-01-30 Pedro Alves <palves@redhat.com>
7873 * config.in, configure: Regenerate.
7874 * configure.ac: Check for getpgid.
7875 * go32-nat.c (go32_pass_ctrlc): New.
7876 (go32_target): Install it.
7877 * inf-child.c (inf_child_target): Install
7878 child_terminal_save_inferior, child_pass_ctrlc and
7880 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7881 (inf_ptrace_target): No longer install it.
7882 * infcmd.c (interrupt_target_1): Adjust.
7883 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7884 (child_interrupt): Declare.
7885 (inferior::terminal_state): New.
7886 * inflow.c (struct terminal_info): Update comments.
7887 (inferior_process_group): Delete.
7888 (terminal_is_ours): Delete.
7889 (gdb_tty_state): New.
7890 (child_terminal_init): Adjust.
7891 (is_gdb_terminal, sharing_input_terminal_1)
7892 (sharing_input_terminal): New functions.
7893 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7894 Set the process's actual process group in the foreground if
7895 possible. Handle is_ours_for_output/is_ours distinction. Don't
7896 mark terminal as the inferior's if not sharing GDB's terminal.
7897 Don't check attach_flag.
7898 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7899 pass down a target_terminal_state.
7900 (child_terminal_save_inferior): New, factored out from ...
7901 (child_terminal_ours_1): ... this. Handle
7902 target_terminal_state::is_ours_for_output.
7903 (child_interrupt, child_pass_ctrlc): New.
7904 (inflow_inferior_exit): Clear the inferior's terminal_state.
7905 (copy_terminal_info): Copy the inferior's terminal state.
7906 (_initialize_inflow): Remove reference to terminal_is_ours.
7907 * inflow.h (inferior_process_group): Delete.
7908 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7909 * procfs.c (procfs_target): Don't install procfs_interrupt.
7910 (procfs_interrupt): Delete.
7911 * remote.c (remote_serial_quit_handler): Adjust.
7912 (remote_interrupt): Remove ptid parameter. Adjust.
7913 * target-delegates.c: Regenerate.
7914 * target.c: Include "terminal.h".
7915 (target_terminal::terminal_state): Rename to ...
7916 (target_terminal::m_terminal_state): ... this.
7917 (target_terminal::init): Adjust.
7918 (target_terminal::inferior): Adjust to per-inferior
7920 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7921 (target_terminal::ours, target_terminal::ours_for_output): Use
7922 target_terminal_is_ours_kind.
7923 (target_interrupt): Remove ptid parameter. Adjust.
7924 (default_target_pass_ctrlc): Adjust.
7925 * target.h (target_ops::to_terminal_save_inferior): New field.
7926 (target_ops::to_interrupt): Remove ptid_t parameter.
7927 (target_interrupt): Remove ptid_t parameter. Update comment.
7928 (target_pass_ctrlc): Update comment.
7929 * target/target.h (target_terminal_state): New scoped enum,
7931 (target_terminal::terminal_state): ... here.
7932 (target_terminal::inferior): Update comments.
7933 (target_terminal::restore_inferior): New.
7934 (target_terminal::is_inferior, target_terminal::is_ours)
7935 (target_terminal::is_ours_for_output): Adjust.
7936 (target_terminal::scoped_restore_terminal_state): Adjust to
7937 rename, and call restore_inferior() instead of inferior().
7938 (target_terminal::scoped_restore_terminal_state::m_state): Change
7940 (target_terminal::terminal_state): Rename to ...
7941 (target_terminal::m_terminal_state): ... this and change type.
7943 2018-01-30 Pedro Alves <palves@redhat.com>
7945 * linux-nat.c (wait_for_signal): New function.
7946 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7948 (async_terminal_is_ours)
7949 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7950 (linux_nat_add_target): Don't override
7951 to_terminal_inferior/to_terminal_ours.
7953 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7955 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7957 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7959 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7960 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7961 dwarf2_per_objfile_free here.
7962 (dwarf2_per_objfile_free): Remove.
7963 (_initialize_dwarf2_read): Don't register
7964 dwarf2_per_objfile_free as a registry cleanup.
7966 2018-01-27 Eli Zaretskii <eliz@gnu.org>
7968 Avoid compilation errors in MinGW native builds
7970 The error is triggered by including python-internal.h, and the
7973 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7974 from build-gnulib/import/math.h:27,
7975 from d:/usr/Python26/include/pyport.h:235,
7976 from d:/usr/Python26/include/Python.h:58,
7977 from python/python-internal.h:94,
7978 from python/py-arch.c:24:
7979 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7983 This happens because Python headers define 'hypot' to expand t
7984 '_hypot' in the Windows builds.
7985 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7986 'hypoth'. This avoids a compilation error.
7988 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7990 * MAINTAINERS (Write After Approval): Fix ordering.
7992 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7994 * MAINTAINERS (Write After Approval): Add Alan Hayward.
7996 2018-01-26 Alan Modra <amodra@gmail.com>
7998 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7999 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8000 Remove nop. Make const. Comment.
8001 (powerpc32_plt_stub_so_2): New.
8002 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8003 Correct count. Update uses.
8004 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8005 Move common code reading PLT entry word. Correct
8006 powerpc32_plt_stub PLT address calculation.
8007 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8008 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8009 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8010 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8011 (ppc64_standard_linkage8): Likewise.
8012 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8013 Correct insns description.
8014 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8016 2018-01-24 Pedro Alves <palves@redhat.com>
8018 GCC PR libstdc++/83906
8019 * gdbtypes.c (operator==(const dynamic_prop &,
8020 const dynamic_prop &)): New.
8021 (operator==(const range_bounds &, const range_bounds &)): New.
8022 (check_types_equal): Use them instead of memcmp.
8023 * gdbtypes.h (operator==(const dynamic_prop &,
8024 const dynamic_prop &)): Declare.
8025 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8026 (operator==(const range_bounds &, const range_bounds &)): Declare.
8027 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8029 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8031 * s390-linux-tdep.c (s390_record_address_mask)
8032 (s390_record_calc_disp_common, s390_record_calc_disp)
8033 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8034 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8035 (s390_process_record): Move to s390-tdep.c.
8036 (s390_linux_init_abi_any): Adjust.
8037 * s390-tdep.c (s390_record_address_mask)
8038 (s390_record_calc_disp_common, s390_record_calc_disp)
8039 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8040 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8041 (s390_process_record): Moved from s390-linux-tdep.c
8042 (s390_gdbarch_init): Adjust.
8044 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8046 * s390-linux-nat.c (s390-tdep.h): New include.
8047 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8048 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8049 (ALLDEPFILES): Add s390-tdep.c.
8050 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8051 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8052 * s390-tdep.h: ...this. New file.
8053 * s390-linux-tdep.c (s390-tdep.h): New include.
8054 (_initialize_s390_tdep): Rename to...
8055 (_initialize_s390_linux_tdep): ...this and adjust.
8056 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8057 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8059 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8060 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8061 (s390_is_partial_instruction, s390_software_single_step)
8062 (is_non_branch_ril, s390_displaced_step_copy_insn)
8063 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8064 (s390_prologue_data, s390_addr, s390_store, s390_load)
8065 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8066 (s390_register_call_saved, s390_guess_tracepoint_registers)
8067 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8068 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8069 (s390_pseudo_register_name, s390_pseudo_register_type)
8070 (s390_pseudo_register_read, s390_pseudo_register_write)
8071 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8072 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8073 (s390_addr_bits_remove, s390_address_class_type_flags)
8074 (s390_address_class_type_flags_to_name)
8075 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8076 (s390_function_arg_float, s390_function_arg_vector)
8077 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8078 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8079 (s390_frame_align, s390_register_return_value, s390_return_value)
8080 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8081 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8082 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8083 (s390_trad_frame_prev_register, s390_unwind_cache)
8084 (s390_prologue_frame_unwind_cache)
8085 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8086 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8087 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8088 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8089 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8090 (s390_frame_base_address, s390_local_base_address)
8091 (s390_frame_base, s390_gcc_target_options)
8092 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8093 (s390_validate_reg_range, s390_tdesc_valid)
8094 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8095 * s390-tdep.c: ...this. New file.
8097 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8099 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8100 (s390_process_record, s390_gdbarch_tdep_alloc)
8101 (s390_linux_init_abi_any): Use/set new hook.
8103 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8105 * s390-linux-tdep.c (osabi.h): New include.
8106 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8107 (s390_linux_init_abi_any): New functions.
8108 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8110 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8112 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8113 tdesc_has_registers check
8115 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8117 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8118 (s390_validate_reg_range): New macro.
8119 (s390_gdbarch_init): Adjust.
8121 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8123 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8124 (s390_gdbarch_tdep_alloc): Adjust.
8125 (s390_gdbarch_init): Adjust.
8127 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8129 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8130 <have_tdb>: Change type to bool.
8131 (s390_gdbarch_tdep_alloc): Adjust.
8132 (s390_gdbarch_init): Adjust.
8134 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8136 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8137 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8138 (s390_gdbarch_tdep_alloc): New function.
8139 (s390_gdbarch_init): Allocate tdep at start and use its fields
8140 instead of separate variables.
8142 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8144 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8145 when looking for cached gdbarch and add comment for remaining.
8147 2018-01-22 Pedro Alves <palves@redhat.com>
8148 Sergio Durigan Junior <sergiodj@redhat.com>
8150 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8153 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8155 * MAINTAINERS: Update my company e-mail address.
8157 2018-01-22 Yao Qi <yao.qi@linaro.org>
8159 * regcache.c (cooked_write_test): New function.
8160 (_initialize_regcache): Register the test.
8162 2018-01-22 Yao Qi <yao.qi@linaro.org>
8164 * ia64-tdep.c (ia64_pseudo_register_read): Call
8165 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8166 * m32c-tdep.c (m32c_cat_read): Likewise.
8167 (m32c_r3r2r1r0_read): Likewise.
8168 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8169 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8171 2018-01-22 Yao Qi <yao.qi@linaro.org>
8173 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8174 method raw_read instead of regcache_raw_read.
8175 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8176 * arm-tdep.c (arm_neon_quad_read): Likewise.
8177 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8178 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8179 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8180 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8181 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8182 (i386_pseudo_register_read_into_value): Likewise.
8183 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8184 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8185 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8186 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8187 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8188 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8189 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8190 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8191 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8193 2018-01-22 Yao Qi <yao.qi@linaro.org>
8195 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8196 * configure.tgt: Remove target mt.
8197 * mt-tdep.c: Remove.
8198 * regcache.c (cooked_read_test): Remove the check for mt.
8200 2018-01-22 Yao Qi <yao.qi@linaro.org>
8202 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8203 instead of gdbarch_pseudo_register_read_value.
8205 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8207 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8210 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8212 * linespec.c (create_sals_line_offset): Remove code that preserved
8213 the symtab_and_line's line number.
8215 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8217 * varobj.c (varobj_create): Don't set valid_block when creating a
8220 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8222 * varobj.c (varobj_create): Remove out of date comment.
8224 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8227 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8228 updating innermost block.
8229 * parse.c (innermost_block_tracker::update): Take extra type
8230 parameter, and check types match before updating innermost block.
8231 (write_dollar_variable): Update innermost block for registers.
8232 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8233 (innermost_block_tracker::innermost_block_tracker): Initialise
8235 (innermost_block_tracker::reset): Take type parameter.
8236 (innermost_block_tracker::update): Take type parameter, and pass
8237 type through as needed.
8238 (innermost_block_tracker::m_types): New member.
8239 * varobj.c (varobj_create): Pass type when reseting innermost
8242 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8244 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8245 * ada-lang.c (resolve_subexp): Likewise.
8246 * breakpoint.c (set_breakpoint_condition) Likewise.
8247 (watch_command_1) Likewise.
8248 * c-exp.y (variable): Likewise.
8249 * d-exp.y (PrimaryExpression): Likewise.
8250 * f-exp.y (variable): Likewise.
8251 * go-exp.y (variable): Likewise.
8252 * m2-exp.y (variable): Likewise.
8253 * objfiles.c (objfile::~objfile): Likewise.
8254 * p-exp.y (variable): Likewise.
8255 * parse.c (innermost_block): Change type.
8256 * parser-defs.h (class innermost_block_tracker): New.
8257 (innermost_block): Change to innermost_block_tracker.
8258 * printcmd.c (display_command): Switch to innermost_block API.
8259 (do_one_display): Likewise.
8260 * rust-exp.y (do_one_display): Likewise.
8261 * symfile.c (clear_symtab_users): Likewise.
8262 * varobj.c (varobj_create): Switch to innermost_block API, replace
8263 use of innermost_block with block stored on varobj object.
8265 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8267 * expression.h (innermost_block): Remove declaration.
8268 * varobj.c: Add 'parser-defs.h' include.
8270 2018-01-19 Tom Tromey <tom@tromey.com>
8272 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8273 symbols in the static and global blocks.
8275 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8277 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8278 gdb_ptrace.h, and move including gdb_wait.h ...
8279 * nat/linux-ptrace.h: ... to here.
8281 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8283 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8284 inf_ptrace_detach_success.
8285 (inf_ptrace_detach_success): Add inferior parameter, use it
8286 instead of inferior_ptid, pass it to detach_inferior.
8287 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8289 * inferior.c (detach_inferior): Add overload that takes an
8291 * inferior.h (detach_inferior): Likewise.
8292 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8293 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8294 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8296 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8298 * target.h (struct target_ops) <to_detach>: Add inferior
8300 (target_detach): Likewise.
8301 * target.c (dispose_inferior): Pass inferior down.
8302 (target_detach): Pass inferior down. Assert that it is equal to
8303 the current inferior.
8304 * aix-thread.c (aix_thread_detach): Pass inferior down.
8305 * corefile.c (core_file_command): Pass current_inferior() down.
8306 * corelow.c (core_detach): Add inferior parameter.
8307 * darwin-nat.c (darwin_detach): Likewise.
8308 * gnu-nat.c (gnu_detach): Likewise.
8309 * inf-ptrace.c (inf_ptrace_detach): Likewise.
8310 * infcmd.c (detach_command): Pass current_inferior() down to
8312 * infrun.c (follow_fork_inferior): Pass parent_inf to
8314 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
8316 * linux-nat.c (linux_nat_detach): Add inferior parameter.
8317 * linux-thread-db.c (thread_db_detach): Likewise.
8318 * nto-procfs.c (procfs_detach): Likewise.
8319 * procfs.c (procfs_detach): Likewise.
8320 * record.c (record_detach): Likewise.
8321 * record.h (struct inferior): Forward-declare.
8322 (record_detach): Add inferior parameter.
8323 * remote-sim.c (gdbsim_detach): Likewise.
8324 * remote.c (remote_detach_1): Likewise.
8325 (remote_detach): Likewise.
8326 (extended_remote_detach): Likewise.
8327 * sol-thread.c (sol_thread_detach): Likewise.
8328 * target-debug.h (target_debug_print_inferior_p): New macro.
8329 * target-delegates.c: Re-generate.
8330 * top.c (kill_or_detach): Pass inferior down to target_detach.
8331 * windows-nat.c (windows_detach): Add inferior parameter.
8333 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8335 * target.h (struct target_ops) <to_detach>: Remove args
8337 (target_detach): Likewise.
8338 * target.c (dispose_inferior): Adjust.
8339 (target_detach): Remove args parameter, adjust.
8340 * aix-thread.c (aix_thread_detach): Adjust.
8341 * corefile.c (core_file_command): Adjust.
8342 * corelow.c (core_detach): Adjust.
8343 * darwin-nat.c (darwin_detach): Adjust.
8344 * gnu-nat.c (gnu_detach): Adjust.
8345 * inf-ptrace.c (inf_ptrace_detach): Adjust.
8346 * infcmd.c (detach_command): Adjust
8347 * infrun.c (follow_fork_inferior): Adjust.
8348 (handle_vfork_child_exec_or_exit): Adjust.
8349 * linux-fork.c (linux_fork_detach): Remove args parameter.
8350 * linux-fork.h (linux_fork_detach): Likewise.
8351 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
8352 * linux-thread-db.c (thread_db_detach): Likewise.
8353 * nto-procfs.c (procfs_detach): Likewise.
8354 * procfs.c (procfs_detach): Likewise.
8355 (do_detach): Remove signo parameter.
8356 * record.c (record_detach): Remove args parameter.
8357 * record.h (record_detach): Likewise.
8358 * remote-sim.c (gdbsim_detach): Likewise.
8359 * remote.c (remote_detach_1): Likewise.
8360 (remote_detach): Likewise.
8361 (extended_remote_detach): Likewise.
8362 * sol-thread.c (sol_thread_detach): Likewise.
8363 * target-delegates.c: Re-generate.
8364 * top.c (struct qt_args) <args>: Remove field.
8365 (kill_or_detach): Don't pass args.
8366 (quit_force): Don't set args.
8367 * windows-nat.c (windows_detach): Remove args parameter.
8369 2018-01-19 Yao Qi <yao.qi@linaro.org>
8371 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
8372 (arm_linux_init_abi): Install it.
8374 2018-01-19 Yao Qi <yao.qi@linaro.org>
8376 * osabi.c (gdb_osabi_names): Extend the regexp for
8377 arm-linux-gnueabihf.
8379 2018-01-18 Yao Qi <yao.qi@linaro.org>
8381 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
8383 (abbrev_table::add_abbrev): Update.
8384 (abbrev_table::lookup_abbrev): Update.
8386 2018-01-18 Yao Qi <yao.qi@linaro.org>
8388 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
8390 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
8392 * compile/compile.c (compile_to_object): Convert "triplet_rx"
8395 2018-01-17 Tom Tromey <tom@tromey.com>
8397 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
8399 2018-01-17 Tom Tromey <tom@tromey.com>
8401 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
8402 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
8403 (create_array_type_with_stride): Update.
8404 * dwarf2read.c (set_die_type): Update.
8406 2018-01-17 Tom Tromey <tom@tromey.com>
8408 * dwarf2read.c (delayed_method_info): Remove typedef.
8409 (dwarf2_cu::method_info): Now a std::vector.
8410 (add_to_method_list): Update.
8411 (free_delayed_list): Remove.
8412 (compute_delayed_physnames): Update.
8413 (process_full_comp_unit, process_full_type_unit): Clear the method
8414 list. Remove cleanups.
8415 (psymtab_include_file_name): Add name_holder parameter. Use
8417 (dwarf_decode_lines): Update.
8419 2018-01-17 Tom Tromey <tom@tromey.com>
8420 Simon Marchi <simon.marchi@ericsson.com>
8422 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
8423 (dwarf2_per_objfile::free_cached_comp_units)
8424 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8425 (init_cutu_and_read_dies_no_follow): Update.
8426 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
8427 (dwarf2_cu::~dwarf2_cu): New.
8428 (free_heap_comp_unit, free_stack_comp_unit): Remove.
8429 (age_cached_comp_units, free_one_cached_comp_unit): Update.
8431 2018-01-17 Tom Tromey <tom@tromey.com>
8432 Simon Marchi <simon.marchi@ericsson.com>
8434 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
8435 (struct die_reader_specs) <abbrev_table>: New member.
8436 (struct abbrev_table): Add constructor.
8437 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
8438 <abbrev_obstack>: Now an auto_obstack.
8439 (abbrev_table_up): New typedef.
8440 (init_cu_die_reader): Add abbrev_table parameter.
8441 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
8442 Add result_dwo_abbrev_table.
8443 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
8444 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
8446 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
8448 (skip_children): Update.
8449 (abbrev_table::alloc_abbrev): Rename from
8450 abbrev_table_alloc_abbrev.
8451 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
8452 (abbrev_table::lookup_abbrev): Rename from
8453 abbrev_table_lookup_abbrev.
8454 (abbrev_table_read_table): Return abbrev_table_up.
8455 (abbrev_table_free, abbrev_table_free_cleanup)
8456 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
8457 (load_partial_dies): Update.
8459 2018-01-17 Tom Tromey <tom@tromey.com>
8461 * dwarf2read.c (dwarf2_compute_name): Update comment.
8462 (read_func_scope, read_variable): Update.
8463 (new_symbol): Remove.
8464 (new_symbol_full): Rename to new_symbol.
8466 2018-01-17 Mike Gulick <mgulick@mathworks.com>
8469 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
8470 a warning instead of throwing an error, set section size to 0 and return
8472 * gdb_bfd.h (gdb_bfd_map_section): Update description.
8474 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8476 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
8478 (linux_ptrace_attach_fail_reason_string): Likewise.
8479 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
8481 (linux_ptrace_attach_fail_reason_string): Likewise.
8482 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
8484 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
8486 * linux-nat.c (linux_nat_attach): Remove xstrdup.
8488 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
8491 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
8492 checking for fs_base/gs_base fields in struct user_regs_struct.
8493 * configure: Regenerate.
8495 2018-01-17 Yao Qi <yao.qi@linaro.org>
8497 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
8499 (aarch64_linux_init_abi): Install it to gdbarch hook
8502 2018-01-15 Pedro Alves <palves@redhat.com>
8504 * common/signals-state-save-restore.c
8505 (save_original_signals_state): Fix typos.
8507 2017-01-12 Tom Tromey <tom@tromey.com>
8508 Sergio Durigan Junior <sergiodj@redhat.com>
8510 * Makefile.in (install-only): Install gdb-add-index.
8512 2018-01-12 John Baldwin <jhb@FreeBSD.org>
8514 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
8516 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8518 * infrun.c (keep_going_pass_signal): Clear step-over info when
8519 insert_breakpoints fails.
8521 2018-01-11 Pedro Alves <palves@redhat.com>
8524 * infrun.c (resume): Rename to ...
8525 (resume_1): ... this.
8526 (resume): Reimplement as wrapper around resume_1.
8528 2018-01-11 Pedro Alves <palves@redhat.com>
8531 * remote.c (remote_parse_stop_reply): Default to the last-set
8532 general thread instead of to 'magic_null_ptid'.
8534 2018-01-10 Pedro Alves <palves@redhat.com>
8536 * language.h (language_get_symbol_name_matcher): Rename ...
8537 (get_symbol_name_matcher): ... this.
8538 * language.c (language_get_symbol_name_matcher): Ditto.
8539 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
8542 2018-01-10 Pedro Alves <palves@redhat.com>
8546 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
8547 Adjust to use language_get_symbol_name_matcher instead of
8548 language_defn::la_get_symbol_name_matcher.
8549 * language.c (language_get_symbol_name_matcher): If in Ada mode
8550 and the lookup name is a verbatim match, return Ada's matcher.
8551 * language.h (language_get_symbol_name_matcher): Adjust comment.
8552 (ada_lookup_name_info::verbatim_p):: New method.
8554 2018-01-10 Pedro Alves <palves@redhat.com>
8557 * ada-lang.c (ada_collect_symbol_completion_matches): If the
8558 minsym's language is language_auto or language_cplus, pass down
8559 language_ada instead.
8560 * symtab.c (compare_symbol_name): Don't frob symbol language here.
8562 2018-01-10 Pedro Alves <palves@redhat.com>
8565 * minsyms.c (linkage_name_str): New function.
8566 (iterate_over_minimal_symbols): Use it.
8568 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8570 * NEWS: Document that 'info proc' now works on FreeBSD.
8572 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8574 * configure.ac: Check for kinfo_getfile in libutil.
8575 * configure: Regenerate.
8576 * config.in: Regenerate.
8577 * fbsd-nat.c: Include "fbsd-tdep.h".
8578 (fbsd_fetch_cmdline): New.
8579 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
8580 rather than calling error.
8581 (fbsd_info_proc): New.
8582 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
8583 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
8584 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
8586 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8588 * fbsd-nat.c (struct free_deleter): Remove.
8589 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
8591 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8593 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
8594 NULL for an empty pathname.
8596 2018-01-09 John Baldwin <jhb@FreeBSD.org>
8598 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
8599 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
8600 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
8601 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
8602 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
8603 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
8604 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
8605 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
8606 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
8607 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
8608 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
8609 (fbsd_core_fetch_timeval, fbsd_print_sigset)
8610 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
8611 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
8612 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
8614 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
8616 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
8617 (gnu_xfer_auxv): New function.
8618 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
8621 2018-01-08 Yao Qi <yao.qi@linaro.org>
8622 Simon Marchi <simon.marchi@ericsson.com>
8624 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
8626 (COMMON_OBS): Remove selftest.o.
8627 * configure.ac: Append selftest-arch.c and common/selftest.c to
8628 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8629 * configure: Re-generated.
8630 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8632 (maintenance_info_selftests): Likewise.
8634 2018-01-08 Xavier Roirand <roirand@adacore.com>
8636 * ada-valprint.c (val_print_packed_array_elements): Use
8637 proper number of elements when printing an array indexed
8638 by an enumeration type.
8640 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8642 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8643 (dw2_get_file_names_reader): Adjust.
8644 (lookup_dwo_signatured_type): Adjust.
8645 (lookup_dwp_signatured_type): Adjust.
8646 (lookup_signatured_type): Adjust.
8647 (create_type_unit_group): Adjust.
8648 (get_type_unit_group): Adjust.
8649 (process_psymtab_comp_unit_reader): Adjust.
8650 (build_type_psymtabs_reader): Adjust.
8651 (scan_partial_symbols): Adjust.
8652 (add_partial_symbol): Adjust.
8653 (add_partial_subprogram): Adjust.
8654 (peek_die_abbrev): Adjust.
8655 (fixup_go_packaging): Adjust.
8656 (process_imported_unit_die): Adjust.
8657 (dwarf2_compute_name): Adjust.
8658 (dwarf2_physname): Adjust.
8659 (read_import_statement): Adjust.
8660 (handle_DW_AT_stmt_list): Adjust.
8661 (read_file_scope): Adjust.
8662 (read_func_scope): Adjust.
8663 (read_lexical_block_scope): Adjust.
8664 (read_call_site_scope): Adjust.
8665 (read_variable): Adjust.
8666 (dwarf2_rnglists_process): Adjust.
8667 (dwarf2_ranges_process): Adjust.
8668 (dwarf2_ranges_read): Adjust.
8669 (dwarf2_get_pc_bounds): Adjust.
8670 (dwarf2_record_block_ranges): Adjust.
8671 (dwarf2_add_field): Adjust.
8672 (dwarf2_add_member_fn): Adjust.
8673 (read_structure_type): Adjust.
8674 (process_structure_scope): Adjust.
8675 (read_enumeration_type): Adjust.
8676 (read_array_type): Adjust.
8677 (mark_common_block_symbol_computed): Adjust.
8678 (read_common_block): Adjust.
8679 (read_namespace_type): Adjust.
8680 (read_namespace): Adjust.
8681 (read_module_type): Adjust.
8682 (read_tag_pointer_type): Adjust.
8683 (read_tag_ptr_to_member_type): Adjust.
8684 (read_tag_string_type): Adjust.
8685 (read_subroutine_type): Adjust.
8686 (read_typedef): Adjust.
8687 (read_base_type): Adjust.
8688 (attr_to_dynamic_prop): Adjust.
8689 (read_subrange_type): Adjust.
8690 (read_unspecified_type): Adjust.
8691 (dwarf2_read_abbrevs): Adjust.
8692 (load_partial_dies): Adjust.
8693 (read_partial_die): Adjust.
8694 (find_partial_die): Adjust.
8695 (guess_partial_die_structure_name): Adjust.
8696 (fixup_partial_die): Adjust.
8697 (read_attribute_value): Adjust.
8698 (read_addr_index): Adjust.
8699 (read_addr_index_from_leb128): Adjust.
8700 (read_str_index): Adjust.
8701 (dwarf2_string_attr): Adjust.
8702 (get_debug_line_section): Adjust.
8703 (dwarf_decode_line_header): Adjust.
8704 (lnp_state_machine::check_line_address): Adjust.
8705 (dwarf_decode_lines_1): Adjust.
8706 (dwarf_decode_lines): Adjust.
8707 (dwarf2_start_symtab): Adjust.
8708 (var_decode_location): Adjust.
8709 (new_symbol_full): Adjust.
8710 (dwarf2_const_value_data): Adjust.
8711 (dwarf2_const_value_attr): Adjust.
8712 (dwarf2_const_value): Adjust.
8714 (die_containing_type): Adjust.
8715 (build_error_marker_type): Adjust.
8716 (lookup_die_type): Adjust.
8717 (guess_full_die_structure_name): Adjust.
8718 (anonymous_struct_prefix): Adjust.
8719 (determine_prefix): Adjust.
8720 (dwarf2_name): Adjust.
8721 (follow_die_ref_or_sig): Adjust.
8722 (follow_die_offset): Adjust.
8723 (follow_die_ref): Adjust.
8724 (follow_die_sig_1): Adjust.
8725 (follow_die_sig): Adjust.
8726 (get_signatured_type): Adjust.
8727 (get_DW_AT_signature_type): Adjust.
8728 (decode_locdesc): Adjust.
8729 (dwarf_decode_macros): Adjust.
8730 (cu_debug_loc_section): Adjust.
8731 (fill_in_loclist_baton): Adjust.
8732 (dwarf2_symbol_mark_computed): Adjust.
8733 (init_one_comp_unit): Don't assign
8734 dwarf2_cu::dwarf2_per_objfile.
8735 (set_die_type): Adjust.
8737 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8739 * dwarf2read.c (struct mapped_debug_names): Add constructor.
8740 <dwarf2_per_objfile>: New field.
8741 (dwarf2_per_objfile): Remove global.
8742 (get_dwarf2_per_objfile): New function.
8743 (set_dwarf2_per_objfile): New function.
8744 (dwarf2_build_psymtabs_hard): Change objfile parameter to
8746 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8747 (read_abbrev_offset): Likewise.
8748 (read_indirect_string): Likewise.
8749 (read_indirect_line_string): Likewise.
8750 (read_indirect_string_at_offset): Likewise.
8751 (read_indirect_string_from_dwz): Likewise.
8752 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8754 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8755 (create_all_comp_units): Change objfile parameter to
8757 (create_all_type_units): Likewise.
8758 (process_queue): Add dwarf2_per_objfile parameter.
8759 (read_and_check_comp_unit_head): Likewise.
8760 (lookup_dwo_unit_in_dwp): Likewise.
8761 (get_dwp_file): Likewise.
8762 (process_cu_includes): Likewise.
8763 (struct free_dwo_file_cleanup_data): New struct.
8764 (dwarf2_has_info): Use get_dwarf2_per_objfile and
8765 set_dwarf2_per_objfile.
8766 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8767 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8768 context, adjust calls.
8769 (dw2_instantiate_symtab): Likewise.
8770 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8771 (dw2_get_cu): Likewise.
8772 (create_cu_from_index_list): Change objfile parameter to
8774 (create_cus_from_index_list): Get dwarf2_per_objfile from
8775 context, adjust calls.
8776 (create_cus_from_index): Likewise.
8777 (create_signatured_type_table_from_index): Change objfile
8778 parameter to dwarf2_per_objfile.
8779 (create_signatured_type_table_from_debug_names): Change objfile
8780 parameter to dwarf2_per_objfile.
8781 (create_addrmap_from_index): Likewise.
8782 (create_addrmap_from_aranges): Likewise.
8783 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8784 (dw2_setup): Remove.
8785 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8787 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8788 get_dwarf2_per_objfile.
8789 (dw2_forget_cached_source_info): Likewise.
8790 (dw2_map_symtabs_matching_filename): Likewise.
8791 (struct dw2_symtab_iterator) <index>: Remove.
8792 <dwarf2_per_objfile>: New field.
8793 (dw2_symtab_iter_init): Replace index parameter with
8795 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8796 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8797 (dw2_print_stats): Likewise.
8798 (dw2_dump): Likewise.
8799 (dw2_expand_symtabs_for_function): Likewise.
8800 (dw2_expand_all_symtabs): Likewise.
8801 (dw2_expand_symtabs_with_fullname): Likewise.
8802 (dw2_expand_marked_cus): Replace index and objfile parameters
8803 with dwarf2_per_objfile.
8804 (dw_expand_symtabs_matching_file_matcher): Add
8805 dwarf2_per_objfile parameter and adjust calls.
8806 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8808 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8809 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8811 (create_cus_from_debug_names_list): Replace objfile parameter
8812 with dwarf2_per_objfile and adjust calls.
8813 (create_cus_from_debug_names): Likewise.
8814 (dwarf2_read_debug_names): Likewise.
8815 (mapped_debug_names::namei_to_name): Adjust call.
8816 (dw2_debug_names_iterator::next): Likewise.
8817 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8818 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8819 (dw2_debug_names_dump): Likewise.
8820 (dw2_debug_names_expand_symtabs_for_function): Likewise.
8821 (dw2_debug_names_expand_symtabs_matching): Likewise.
8822 (dwarf2_initialize_objfile): Likewise.
8823 (dwarf2_build_psymtabs): Likewise.
8824 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8826 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8827 (read_and_check_comp_unit_head): Likewise.
8828 (read_abbrev_offset): Likewise.
8829 (create_debug_type_hash_table): Likewise.
8830 (create_debug_types_hash_table): Likewise.
8831 (create_all_type_units): Replace objfile parameter with
8833 (add_type_unit): Add dwarf2_per_objfile parameter.
8834 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8835 with dwarf2_per_objfile.
8836 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8837 (lookup_dwp_signatured_type): Likewise.
8838 (lookup_signatured_type): Likewise.
8839 (read_cutu_die_from_dwo): Likewise.
8840 (init_tu_and_read_dwo_dies): Likewise.
8841 (init_cutu_and_read_dies): Likewise.
8842 (init_cutu_and_read_dies_no_follow): Likewise.
8843 (allocate_type_unit_groups_table): Add objfile parameter.
8844 (create_type_unit_group): Use dwarf2_per_objfile from cu.
8845 (get_type_unit_group): Likewise.
8846 (process_psymtab_comp_unit): Update call.
8847 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8848 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8849 (print_tu_stats): Likewise.
8850 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8852 (build_type_psymtabs): Change objfile parameter to
8854 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8855 passed in void* parameter.
8856 (process_skeletonless_type_units): Change objfile parameter to
8858 (set_partial_user): Likewise.
8859 (dwarf2_build_psymtabs_hard): Likewise.
8860 (read_comp_units_from_section): Likewise.
8861 (create_all_comp_units): Likewise.
8862 (scan_partial_symbols): Update calls.
8863 (add_partial_symbol): Likewise.
8864 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8865 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8866 (process_queue): Add dwarf2_per_objfile parameter.
8867 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8868 (compute_compunit_symtab_includes): Likewise.
8869 (process_cu_includes): Add dwarf2_per_objfile parameter.
8870 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8871 (process_full_type_unit): Likewise.
8872 (process_imported_unit_die): Update call.
8873 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8874 (read_file_scope): Likewise.
8875 (allocate_dwo_file_hash_table): Add objfile parameter.
8876 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8877 (create_cus_hash_table): Likewise.
8878 (create_dwp_hash_table): Likewise.
8879 (create_dwo_unit_in_dwp_v1): Likewise.
8880 (create_dwp_v2_section): Likewise.
8881 (create_dwo_unit_in_dwp_v2): Likewise.
8882 (lookup_dwo_unit_in_dwp): Likewise.
8883 (try_open_dwop_file): Likewise.
8884 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8885 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8886 cleanup to include a reference to dwarf2_per_objfile.
8887 (open_dwp_file): Add dwarf2_per_objfile parameter.
8888 (open_and_init_dwp_file): Likewise.
8889 (get_dwp_file): Likewise.
8890 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8891 (queue_and_load_all_dwo_tus): Update call.
8892 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8894 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8895 (dwarf2_ranges_process): Likewise.
8896 (dwarf2_get_pc_bounds): Likewise.
8897 (mark_common_block_symbol_computed): Likewise.
8898 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8899 (dwarf2_read_abbrevs): Update call.
8900 (read_partial_die): Use dwarf2_per_objfile from cu.
8901 (find_partial_die): Likewise.
8902 (fixup_partial_die): Likewise.
8903 (read_attribute_value): Likewise.
8904 (read_indirect_string_at_offset_from): Add objfile parameter.
8905 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8907 (read_indirect_string_from_dwz): Add objfile parameter.
8908 (read_indirect_string): Add objfile parameter.
8909 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8910 (read_addr_index): Use dwarf2_per_objfile from cu.
8911 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8913 (read_str_index): Use dwarf2_per_objfile from cu.
8914 (get_debug_line_section): Likewise.
8915 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8916 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8917 (new_symbol_full): Use dwarf2_per_objfile from cu.
8918 (build_error_marker_type): Likewise.
8919 (lookup_die_type): Likewise.
8920 (determine_prefix): Likewise.
8921 (follow_die_offset): Likewise.
8922 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8923 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8924 (dwarf2_fetch_die_type_sect_off): Likewise.
8925 (dwarf2_get_die_type): Likewise.
8926 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8927 (get_signatured_type): Likewise.
8928 (get_DW_AT_signature_type): Likewise.
8929 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8930 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8931 (cu_debug_loc_section): Likewise.
8932 (fill_in_loclist_baton): Likewise.
8933 (dwarf2_symbol_mark_computed): Likewise.
8934 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8936 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8938 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8939 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8940 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8941 (set_die_type): Use dwarf2_free_objfile from cu.
8942 (get_die_type_at_offset): Likewise.
8943 (dwarf2_per_objfile_free): Don't assign global variable.
8944 (debug_names) <constructor>: Add dwarf2_per_objfile
8945 parameter, update m_debugstrlookup construction.
8946 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8948 <m_dwarf2_per_objfile>: New field.
8949 <lookup>: Use m_dwarf2_per_objfile.
8950 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8951 (psyms_seen_size): Likewise.
8952 (write_gdbindex): Replace objfile parameter with
8954 (write_debug_names): Likewise.
8955 (write_psymtabs_to_index): Likewise.
8956 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8959 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8961 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8962 <dwarf2_per_objfile>: New field.
8963 (struct dwarf2_per_cu_data) <objfile>: Remove.
8964 <dwarf2_per_objfile>: New field.
8965 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8967 (create_signatured_type_table_from_index): Likewise.
8968 (create_debug_type_hash_table): Likewise.
8969 (fill_in_sig_entry_from_dwo_entry): Likewise.
8970 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8971 (create_type_unit_group): Assign dwarf2_per_objfile instead of
8973 (create_partial_symtab): Access objfile through
8975 (process_psymtab_comp_unit_reader): Likewise.
8976 (read_comp_units_from_section): Likewise.
8977 (scan_partial_symbols): Likewise.
8978 (add_partial_symbol): Likewise.
8979 (add_partial_subprogram): Likewise.
8980 (peek_die_abbrev): Likewise.
8981 (fixup_go_packaging): Likewise.
8982 (process_full_comp_unit): Likewise.
8983 (process_full_type_unit): Likewise.
8984 (process_imported_unit_die): Likewise.
8985 (dwarf2_compute_name): Likewise.
8986 (dwarf2_physname): Likewise.
8987 (read_import_statement): Likewise.
8988 (create_cus_hash_table): Assign dwarf2_physname instead of
8990 (read_func_scope): Access objfile through dwarf2_per_objfile.
8991 (read_lexical_block_scope): Likewise.
8992 (read_call_site_scope): Likewise.
8993 (read_variable): Likewise.
8994 (dwarf2_rnglists_process): Likewise.
8995 (dwarf2_ranges_process): Likewise.
8996 (dwarf2_ranges_read): Likewise.
8997 (dwarf2_record_block_ranges): Likewise.
8998 (dwarf2_add_field): Likewise.
8999 (dwarf2_add_member_fn): Likewise.
9000 (read_structure_type): Likewise.
9001 (process_structure_scope): Likewise.
9002 (read_enumeration_type): Likewise.
9003 (read_array_type): Likewise.
9004 (read_common_block): Likewise.
9005 (read_namespace_type): Likewise.
9006 (read_namespace): Likewise.
9007 (read_module_type): Likewise.
9008 (read_tag_pointer_type): Likewise.
9009 (read_tag_ptr_to_member_type): Likewise.
9010 (read_tag_string_type): Likewise.
9011 (read_subroutine_type): Likewise.
9012 (read_typedef): Likewise.
9013 (read_base_type): Likewise.
9014 (attr_to_dynamic_prop): Likewise.
9015 (read_subrange_type): Likewise.
9016 (read_unspecified_type): Likewise.
9017 (load_partial_dies): Likewise.
9018 (read_partial_die): Likewise.
9019 (find_partial_die): Likewise.
9020 (guess_partial_die_structure_name): Likewise.
9021 (fixup_partial_die): Likewise.
9022 (read_attribute_value): Likewise.
9023 (read_addr_index_from_leb128): Likewise.
9024 (dwarf2_read_addr_index): Likewise.
9025 (dwarf2_string_attr): Likewise.
9026 (lnp_state_machine::check_line_address): Likewise.
9027 (dwarf_decode_lines_1): Likewise.
9028 (dwarf_decode_lines): Likewise.
9029 (dwarf2_start_symtab): Likewise.
9030 (var_decode_location): Likewise.
9031 (new_symbol_full): Likewise.
9032 (dwarf2_const_value_data): Likewise.
9033 (dwarf2_const_value_attr): Likewise.
9034 (dwarf2_const_value): Likewise.
9035 (die_type): Likewise.
9036 (die_containing_type): Likewise.
9037 (lookup_die_type): Likewise.
9038 (guess_full_die_structure_name): Likewise.
9039 (anonymous_struct_prefix): Likewise.
9040 (dwarf2_name): Likewise.
9041 (follow_die_ref_or_sig): Likewise.
9042 (follow_die_offset): Likewise.
9043 (follow_die_ref): Likewise.
9044 (dwarf2_fetch_die_loc_sect_off): Likewise.
9045 (dwarf2_fetch_constant_bytes): Likewise.
9046 (dwarf2_fetch_die_type_sect_off): Likewise.
9047 (dwarf2_get_die_type): Likewise.
9048 (follow_die_sig): Likewise.
9049 (decode_locdesc): Likewise.
9050 (dwarf2_per_cu_objfile): Likewise.
9051 (dwarf2_per_cu_text_offset): Likewise.
9052 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9054 (set_die_type): Access objfile through
9057 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9059 * valprint.c (converted_character_d): Remove typedef.
9060 (DEF_VEC_O (converted_character_d)): Remove.
9061 (count_next_character): Use std::vector.
9062 (print_converted_chars_to_obstack): Likewise.
9063 (generic_printstr): Likewise.
9065 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9067 * xml-support.h (struct gdb_xml_value): Add constructor.
9068 <value>: Change type to unique_xmalloc_ptr.
9069 (gdb_xml_value_s): Remove typedef.
9070 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9071 (gdb_xml_element_start_handler): Change parameter type to
9073 (xml_find_attribute): Likewise.
9074 * xml-support.c (xml_find_attribute): Change parameter type to
9075 std::vector and adjust.
9076 (gdb_xml_values_cleanup): Remove.
9077 (gdb_xml_parser::start_element): Adjust to std::vector.
9078 (xinclude_start_include): Change paraeter type to std::vector
9080 * btrace.c (check_xml_btrace_version): Likewise.
9081 (parse_xml_btrace_block): Likewise.
9082 (parse_xml_btrace_pt_config_cpu): Likewise.
9083 (parse_xml_btrace_pt): Likewise.
9084 (parse_xml_btrace_conf_bts): Likewise.
9085 (parse_xml_btrace_conf_pt): Likewise.
9086 * memory-map.c (memory_map_start_memory): Likewise.
9087 (memory_map_start_property): Likewise.
9088 * osdata.c (osdata_start_osdata): Likewise.
9089 (osdata_start_item): Likewise.
9090 (osdata_start_column): Likewise.
9091 * remote.c (start_thread): Likewise.
9092 * solib-aix.c (library_list_start_library): Likewise.
9093 (library_list_start_list): Likewise.
9094 * solib-svr4.c (library_list_start_library): Likewise.
9095 (svr4_library_list_start_list): Likewise.
9096 * solib-target.c (library_list_start_segment): Likewise.
9097 (library_list_start_section): Likewise.
9098 (library_list_start_library): Likewise.
9099 (library_list_start_list): Likewise.
9100 * tracepoint.c (traceframe_info_start_memory): Likewise.
9101 (traceframe_info_start_tvar): Likewise.
9102 * xml-syscall.c (syscall_start_syscall): Likewise.
9103 * xml-tdesc.c (tdesc_start_target): Likewise.
9104 (tdesc_start_feature): Likewise.
9105 (tdesc_start_reg): Likewise.
9106 (tdesc_start_union): Likewise.
9107 (tdesc_start_struct): Likewise.
9108 (tdesc_start_flags): Likewise.
9109 (tdesc_start_enum): Likewise.
9110 (tdesc_start_field): Likewise.
9111 (tdesc_start_enum_value): Likewise.
9112 (tdesc_start_vector): Likewise.
9114 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9116 * extension.h (struct xmethod_worker) <clone>: Remove.
9117 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9119 (python_xmethod_worker::clone): Remove.
9120 * valops.c (find_overload_match): Use std::move instead of
9123 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9125 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9126 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9127 <free_xmethod_worker_data>: Remove.
9128 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9129 <get_xmethod_arg_types>: Remove.
9130 <get_xmethod_result_type>: Remove.
9131 <invoke_xmethod>: Remove.
9132 * extension.c (new_xmethod_worker): Remove.
9133 (clone_xmethod_worker): Remove.
9134 (get_matching_xmethod_workers): Return void, pass std::vector by
9136 (get_xmethod_arg_types): Rename to...
9137 (xmethod_worker::get_arg_types): ... this, and adjust.
9138 (get_xmethod_result_type): Rename to...
9139 (xmethod_worker::get_result_type): ... this, and adjust.
9140 (invoke_xmethod): Remove.
9141 (free_xmethod_worker): Remove.
9142 (free_xmethod_worker_vec): Remove.
9143 * extension.h (enum ext_lang_rc): Move here from
9145 (struct xmethod_worker): Add constructor and destructor.
9148 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9149 virtual pure methods.
9150 <get_arg_types, get_result_type>: New methods.
9151 (xmethod_worker_ptr): Remove typedef.
9152 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9153 (xmethod_worker_vec): Remove typedef.
9154 (xmethod_worker_up): New typedef.
9155 (invoke_xmethod): Remove.
9156 (clone_xmethod_worker): Remove.
9157 (free_xmethod_worker): Remove.
9158 (free_xmethod_worker_vec): Remove.
9159 (get_xmethod_arg_types): Remove.
9160 (get_xmethod_result_type): Remove.
9161 * valops.c (find_method_list): Use std::vector, don't use
9162 intermediate vector.
9163 (value_find_oload_method_list): Use std::vector.
9164 (find_overload_match): Use std::vector.
9165 (find_oload_champ): Use std::vector.
9166 * value.c (value_free): Use operator delete.
9167 (value_of_xmethod): Rename to...
9168 (value_from_xmethod): ... this. Don't assign
9169 xmethod_worker::value, take rvalue-reference.
9170 (result_type_of_xmethod): Adjust.
9171 (call_xmethod): Adjust.
9172 * value.h: Include extension.h.
9173 (struct xmethod_worker): Don't forward-declare.
9174 (value_of_xmethod): Rename to...
9175 (value_from_xmethod): ... this, take rvalue-reference.
9176 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9177 (struct python_xmethod_worker): ... this, add constructor and
9179 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9180 (gdbpy_free_xmethod_worker_data): Rename to...
9181 (python_xmethod_worker::~python_xmethod_worker): ... this and
9183 (gdbpy_clone_xmethod_worker_data): Rename to...
9184 (python_xmethod_worker::clone): ... this and adjust.
9185 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9187 (gdbpy_get_xmethod_arg_types): Rename to...
9188 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9189 (gdbpy_get_xmethod_result_type): Rename to...
9190 (python_xmethod_worker::do_get_result_type): ... this and
9192 (gdbpy_invoke_xmethod): Rename to...
9193 (python_xmethod_worker::invoke): ... this and adjust.
9194 (new_python_xmethod_worker): Rename to...
9195 (python_xmethod_worker::python_xmethod_worker): ... this and
9197 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9199 (gdbpy_free_xmethod_worker_data): Remove.
9200 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9201 (gdbpy_get_xmethod_arg_types): Remove.
9202 (gdbpy_get_xmethod_result_type): Remove.
9203 (gdbpy_invoke_xmethod): Remove.
9204 * python/python.c (python_extension_ops): Remove obsolete
9207 2018-01-05 Pedro Alves <palves@redhat.com>
9210 * common/signals-state-save-restore.c
9211 (save_original_signals_state): New parameter 'quiet'. Warn if we
9212 find a custom handler preinstalled, instead of internal erroring.
9213 But only warn if !quiet.
9214 * common/signals-state-save-restore.h
9215 (save_original_signals_state): New parameter 'quiet'.
9216 * main.c (captured_main_1): Move save_original_signals_state call
9217 after option handling, and pass QUIET.
9219 2018-01-05 Pedro Alves <palves@redhat.com>
9221 * spu-tdep.c (spu_catch_start): Pass
9222 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9224 2018-01-05 Pedro Alves <palves@redhat.com>
9227 * ada-lang.c (literal_symbol_name_matcher): New function.
9228 (ada_get_symbol_name_matcher): Use it for
9229 symbol_name_match_type::SEARCH_NAME.
9230 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9231 it down instead of assuming symbol_name_match_type::FULL.
9232 * block.h (block_lookup_symbol): New parameter 'match_type'.
9233 * c-valprint.c (print_unpacked_pointer): Use
9234 lookup_symbol_search_name instead of lookup_symbol.
9235 * compile/compile-object-load.c (get_out_value_type): Pass down
9236 symbol_name_match_type::SEARCH_NAME.
9237 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9238 symbol_name_match_type::FULL.
9239 * cp-support.c (cp_get_symbol_name_matcher): Handle
9240 symbol_name_match_type::SEARCH_NAME.
9241 * infrun.c (insert_exception_resume_breakpoint): Use
9242 lookup_symbol_search_name.
9243 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9244 * psymtab.c (maintenance_check_psymtabs): Use
9245 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9246 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9248 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9249 if symbol_name_match_type::SEARCH_NAME.
9250 (lookup_symbol_in_language): Pass down
9251 symbol_name_match_type::FULL.
9252 (lookup_symbol_search_name): New.
9253 (lookup_language_this): Pass down
9254 symbol_name_match_type::SEARCH_NAME.
9255 (lookup_symbol_aux, lookup_local_symbol): New parameter
9256 'match_type'. Pass it down.
9257 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9258 (lookup_symbol_search_name): New declaration.
9259 (lookup_symbol_in_block): New 'match_type' parameter.
9261 2018-01-05 Pedro Alves <palves@redhat.com>
9264 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9266 (ada_lookup_symbol): Reimplement in terms of
9267 ada_lookup_symbol_list, bits factored out from
9268 ada_lookup_encoded_symbol.
9270 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9272 * ada-exp.y (write_object_renaming): When subscripting an array
9273 using a symbol as the index, pass the block in call to
9274 ada_lookup_encoded_symbol when looking that symbol up.
9276 2018-01-05 Jerome Guitton <guitton@adacore.com>
9278 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9281 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9283 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9284 the case where VALUE_LVAL (val0) is not lval_memory.
9286 2018-01-05 Xavier Roirand <roirand@adacore.com>
9288 * ada-valprint.c (print_optional_low_bound): Handle
9289 character-indexed array printing like boolean-indexed array
9292 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9294 * NEWS: Create a new section for the next release branch.
9295 Rename the section of the current branch, now that it has
9298 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9300 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9301 * version.in: Bump version to 8.1.50.DATE-git.
9303 2018-01-03 Xavier Roirand <roirand@adacore.com>
9305 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
9307 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
9309 (default_exception_support_info) <catch_handlers_sym>: Add field.
9310 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
9311 (ada_exception_name_addr_1): Add "catch handlers" handling.
9312 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
9314 (create_excep_cond_exprs) <ex>: Add parameter.
9315 (re_set_exception): Update create_excep_cond_exprs call.
9316 (print_it_exception, print_one_exception, print_mention_exception)
9317 (print_recreate_exception): Add "catch handler" handling.
9318 (allocate_location_catch_handlers, re_set_catch_handlers)
9319 (check_status_catch_handlers, print_it_catch_handlers)
9320 (print_one_catch_handlers, print_mention_catch_handlers)
9321 (print_recreate_catch_handlers): New function.
9322 (catch_handlers_breakpoint_ops): New variable.
9323 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
9324 Add parameter. Add "catch handler" handling.
9325 (ada_exception_sym_name, ada_exception_breakpoint_ops):
9326 Add "catch handler" handling.
9327 (ada_exception_catchpoint_cond_string): Add "catch handler"
9329 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
9331 (catch_ada_handlers_command): New function.
9332 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
9333 operations structure.
9334 (_initialize_ada_language): Add "catch handlers" command entry.
9335 * NEWS: Document "catch handlers" feature.
9337 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9339 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
9340 account when creating the array type of the slice.
9341 (ada_value_slice): Likewise.
9343 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9345 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
9347 (create_array_type_with_stride): Add byte_stride_prop parameter.
9348 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
9349 New parameter. Update all callers in this file.
9350 (array_type_has_dynamic_stride): New function.
9351 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
9352 of arrays with dynamic byte strides.
9353 * dwarf2read.c (read_array_type): Add support for dynamic
9354 DW_AT_byte_stride attributes.
9356 2018-01-02 Joel Brobecker <brobecker@adacore.com>
9358 * dwarf2read.c (read_unspecified_type): Treat
9359 DW_TAG_enumeration_type DIEs from Ada units as stubs.
9361 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9363 Update copyright year range in all GDB files.
9365 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9367 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
9368 and gdb/testsuite/gdb.base/step-line.c.
9370 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9372 * copyright.py (main): Dump the contents of
9373 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
9374 even if BY_HAND is empty.
9376 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9378 * top.c (print_gdb_version): Update Copyright year in version
9381 2018-01-01 Joel Brobecker <brobecker@adacore.com>
9383 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
9385 For older changes see ChangeLog-2017.
9391 version-control: never